/**
 * Given two lists, movie1 and movie2, you need to find the common actors between them.
 *
 * @param movie1 A list of actors/actresses who starred in movie1
 * @param movie2 A list of actors/actresses who starred in movie2
 * @return A list of actors/actresses who appeared in both movies
 */
fun findCommonActors(movie1: List<String>, movie2: List<String>): List<String> {

    val commonActors = mutableListOf<String>()

    // Traverse through movie1
    for (actor in movie1) {
        // Check if the actor is also in movie2
        if (actor in movie2) {
            // Add the actor to the commonActors list
            commonActors.add(actor)
        }
    }

    return commonActors
}
/**
 * Given two lists, movie1 and movie2, you need to find the common actors between them.
 *
 * @param movie1 A list of actors/actresses who starred in movie1
 * @param movie2 A list of actors/actresses who starred in movie2
 * @return A list of actors/actresses who appeared in both movies
 */
fun findCommonActors(movie1: List<String>, movie2: List<String>): List<String> {
/**
 * Given two lists, movie1 and movie2, you need to find the common actors between them.
 *
 * @param movie1 A list of actors/actresses who starred in movie1
 * @param movie2 A list of actors/actresses who starred in movie2
 * @return A list of actors/actresses who appeared in both movies
 */
fun findCommonActors(movie1: List<String>, movie2: List<String>): List<String> {

    val commonActors = mutableListOf<String>()

    // Traverse through movie1
    for (actor in movie1) {
        // Check if the actor is also in movie2
        if (actor in movie2) {
            // Add the actor to the commonActors list
            commonActors.add(actor)
        }
    }

    return commonActors
}