/**
 * Given two sets of movies featuring different actors, return a set of movies that both actors have appeared in.
 *
 * @param actorSet1 A set of movies featuring actor 1
 * @param actorSet2 A set of movies featuring actor 2
 * @return A set of movies that both actors have appeared in
 *
 * Example:
 * actor1Movies = setOf("Movie A", "Movie B", "Movie C")
 * actor2Movies = setOf("Movie B", "Movie C", "Movie D")
 * findCommonMovies(actor1Movies, actor2Movies) // Output: ["Movie B", "Movie C"]
 */
fun findCommonMovies(actorSet1: Set<String>, actorSet2: Set<String>): Set<String> {

    // Find the common movies between the two sets
    return actorSet1.intersect(actorSet2)
}
/**
 * Given two sets of movies featuring different actors, return a set of movies that both actors have appeared in.
 *
 * @param actorSet1 A set of movies featuring actor 1
 * @param actorSet2 A set of movies featuring actor 2
 * @return A set of movies that both actors have appeared in
 *
 * Example:
 * actor1Movies = setOf("Movie A", "Movie B", "Movie C")
 * actor2Movies = setOf("Movie B", "Movie C", "Movie D")
 * findCommonMovies(actor1Movies, actor2Movies) // Output: ["Movie B", "Movie C"]
 */
fun findCommonMovies(actorSet1: Set<String>, actorSet2: Set<String>): Set<String> {
/**
 * Given two sets of movies featuring different actors, return a set of movies that both actors have appeared in.
 *
 * @param actorSet1 A set of movies featuring actor 1
 * @param actorSet2 A set of movies featuring actor 2
 * @return A set of movies that both actors have appeared in
 *
 * Example:
 * actor1Movies = setOf("Movie A", "Movie B", "Movie C")
 * actor2Movies = setOf("Movie B", "Movie C", "Movie D")
 * findCommonMovies(actor1Movies, actor2Movies) // Output: ["Movie B", "Movie C"]
 */
fun findCommonMovies(actorSet1: Set<String>, actorSet2: Set<String>): Set<String> {

    // Find the common movies between the two sets
    return actorSet1.intersect(actorSet2)
}