/**
 * You are given two sets, dancerMoves and partnerMoves, which represent the dance moves of a dancer and their partner.
 * Your task is to find the common dance moves between the two dancers and return a set containing those moves.
 * Both dancerMoves and partnerMoves are sets of strings.
 *
 * Example:
 * dancerMoves = setOf("spin", "twist", "jump", "turn")
 * partnerMoves = setOf("jump", "spin", "slide", "kick")
 *
 * Expected Output:
 * setOf("spin", "jump")
 */
fun findCommonMoves(dancerMoves: Set<String>, partnerMoves: Set<String>): Set<String> {

    val commonMoves = mutableSetOf<String>()

    // Loop through each move in dancerMoves
    for (move in dancerMoves) {
        // Loop through each move in partnerMoves
        for (partnerMove in partnerMoves) {
            // Check if the move exists in both sets
            if (move == partnerMove) {
                // Add the move to the commonMoves set
                commonMoves.add(move)
                // If found, break the inner loop
                break
            }
        }
    }

    return commonMoves
}
/**
 * You are given two sets, dancerMoves and partnerMoves, which represent the dance moves of a dancer and their partner.
 * Your task is to find the common dance moves between the two dancers and return a set containing those moves.
 * Both dancerMoves and partnerMoves are sets of strings.
 *
 * Example:
 * dancerMoves = setOf("spin", "twist", "jump", "turn")
 * partnerMoves = setOf("jump", "spin", "slide", "kick")
 *
 * Expected Output:
 * setOf("spin", "jump")
 */
fun findCommonMoves(dancerMoves: Set<String>, partnerMoves: Set<String>): Set<String> {
/**
 * You are given two sets, dancerMoves and partnerMoves, which represent the dance moves of a dancer and their partner.
 * Your task is to find the common dance moves between the two dancers and return a set containing those moves.
 * Both dancerMoves and partnerMoves are sets of strings.
 *
 * Example:
 * dancerMoves = setOf("spin", "twist", "jump", "turn")
 * partnerMoves = setOf("jump", "spin", "slide", "kick")
 *
 * Expected Output:
 * setOf("spin", "jump")
 */
fun findCommonMoves(dancerMoves: Set<String>, partnerMoves: Set<String>): Set<String> {

    val commonMoves = mutableSetOf<String>()

    // Loop through each move in dancerMoves
    for (move in dancerMoves) {
        // Loop through each move in partnerMoves
        for (partnerMove in partnerMoves) {
            // Check if the move exists in both sets
            if (move == partnerMove) {
                // Add the move to the commonMoves set
                commonMoves.add(move)
                // If found, break the inner loop
                break
            }
        }
    }

    return commonMoves
}