/**
 * You are given a map representing a zoo, where the keys are the names of animals and the
 * values are boolean values indicating whether the animals are nocturnal or not. Your task is to iterate
 * over the map and find the names of all the nocturnal animals. Return a list of these names.
 *
 * @param zoo A map representing the zoo, where keys are animal names and values are boolean
 * values indicating whether the animals are nocturnal or not.
 * @return A list of names of nocturnal animals.
 */
fun findNocturnalAnimals(zoo: Map<String, Boolean>): List<String> {

    val nocturnalAnimals = mutableListOf<String>()

    // Iterate over the map
    for ((animal, nocturnal) in zoo) {
        if (nocturnal) {
            nocturnalAnimals.add(animal)
        }
    }

    return nocturnalAnimals
}
/**
 * You are given a map representing a zoo, where the keys are the names of animals and the
 * values are boolean values indicating whether the animals are nocturnal or not. Your task is to iterate
 * over the map and find the names of all the nocturnal animals. Return a list of these names.
 *
 * @param zoo A map representing the zoo, where keys are animal names and values are boolean
 * values indicating whether the animals are nocturnal or not.
 * @return A list of names of nocturnal animals.
 */
fun findNocturnalAnimals(zoo: Map<String, Boolean>): List<String> {
/**
 * You are given a map representing a zoo, where the keys are the names of animals and the
 * values are boolean values indicating whether the animals are nocturnal or not. Your task is to iterate
 * over the map and find the names of all the nocturnal animals. Return a list of these names.
 *
 * @param zoo A map representing the zoo, where keys are animal names and values are boolean
 * values indicating whether the animals are nocturnal or not.
 * @return A list of names of nocturnal animals.
 */
fun findNocturnalAnimals(zoo: Map<String, Boolean>): List<String> {

    val nocturnalAnimals = mutableListOf<String>()

    // Iterate over the map
    for ((animal, nocturnal) in zoo) {
        if (nocturnal) {
            nocturnalAnimals.add(animal)
        }
    }

    return nocturnalAnimals
}