/**
 * Given a list of movies and the name of an actor, find all the movies in which the actor appears.
 */
fun findMovies(actor: String, movies: List<List<String>>): List<List<String>> {

    val actorMovies = mutableListOf<List<String>>()

    for (movie in movies) {
        for (cast in movie) {
            if (cast == actor) {
                actorMovies.add(movie)
                break
            }
        }
    }

    return actorMovies
}
/**
 * Given a list of movies and the name of an actor, find all the movies in which the actor appears.
 */
fun findMovies(actor: String, movies: List<List<String>>): List<List<String>> {
/**
 * Given a list of movies and the name of an actor, find all the movies in which the actor appears.
 */
fun findMovies(actor: String, movies: List<List<String>>): List<List<String>> {

    val actorMovies = mutableListOf<List<String>>()

    for (movie in movies) {
        for (cast in movie) {
            if (cast == actor) {
                actorMovies.add(movie)
                break
            }
        }
    }

    return actorMovies
}