/**
 * This exercise focuses on finding common movies between two actors and using complex numbers in Kotlin.
 *
 * Given two lists of movies (represented as strings), find the common movies between two actors and return them in a set.
 *
 * @param actor1 List of movies for actor 1.
 * @param actor2 List of movies for actor 2.
 * @return Set of common movies between the two actors.
 */
fun getCommonMovies(actor1: List<String>, actor2: List<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Find the common movies between the two actors
    for (movie1 in actor1) {  // Loop through each movie of actor1
        for (movie2 in actor2) {  // Loop through each movie of actor2
            if (movie1 == movie2) {  // If a common movie is found
                commonMovies.add(movie1)  // Add it to the commonMovies set
            }
        }
    }

    return commonMovies
}
/**
 * This exercise focuses on finding common movies between two actors and using complex numbers in Kotlin.
 *
 * Given two lists of movies (represented as strings), find the common movies between two actors and return them in a set.
 *
 * @param actor1 List of movies for actor 1.
 * @param actor2 List of movies for actor 2.
 * @return Set of common movies between the two actors.
 */
fun getCommonMovies(actor1: List<String>, actor2: List<String>): Set<String> {
/**
 * This exercise focuses on finding common movies between two actors and using complex numbers in Kotlin.
 *
 * Given two lists of movies (represented as strings), find the common movies between two actors and return them in a set.
 *
 * @param actor1 List of movies for actor 1.
 * @param actor2 List of movies for actor 2.
 * @return Set of common movies between the two actors.
 */
fun getCommonMovies(actor1: List<String>, actor2: List<String>): Set<String> {

    val commonMovies = mutableSetOf<String>()

    // Find the common movies between the two actors
    for (movie1 in actor1) {  // Loop through each movie of actor1
        for (movie2 in actor2) {  // Loop through each movie of actor2
            if (movie1 == movie2) {  // If a common movie is found
                commonMovies.add(movie1)  // Add it to the commonMovies set
            }
        }
    }

    return commonMovies
}