/**
 * Given two sets of movies that actor1 and actor2 have acted in, write a function to find the common movies between them.
 *
 * @param actor1 A set of movies actor1 has acted in
 * @param actor2 A set of movies actor2 has acted in
 * @return A set of common movies between actor1 and actor2
 */
fun findCommonMovies(actor1: Set<String>, actor2: Set<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Iterate through actor1's movie set
    for (movie in actor1) {
        // Check if the movie is also in actor2's movie set
        if (movie in actor2) {
            // Add the movie to the commonMovies set
            commonMovies.add(movie)
        }
    }

    return commonMovies
}
/**
 * Given two sets of movies that actor1 and actor2 have acted in, write a function to find the common movies between them.
 *
 * @param actor1 A set of movies actor1 has acted in
 * @param actor2 A set of movies actor2 has acted in
 * @return A set of common movies between actor1 and actor2
 */
fun findCommonMovies(actor1: Set<String>, actor2: Set<String>): Set<String> {
/**
 * Given two sets of movies that actor1 and actor2 have acted in, write a function to find the common movies between them.
 *
 * @param actor1 A set of movies actor1 has acted in
 * @param actor2 A set of movies actor2 has acted in
 * @return A set of common movies between actor1 and actor2
 */
fun findCommonMovies(actor1: Set<String>, actor2: Set<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Iterate through actor1's movie set
    for (movie in actor1) {
        // Check if the movie is also in actor2's movie set
        if (movie in actor2) {
            // Add the movie to the commonMovies set
            commonMovies.add(movie)
        }
    }

    return commonMovies
}