/**
 * This function takes in two lists of species observed by two zoologists and returns the count of common species.
 *
 * @param zoologist1 The list of species observed by the first zoologist.
 * @param zoologist2 The list of species observed by the second zoologist.
 * @return The count of common species observed by both zoologists.
 */
fun countCommonSpecies(zoologist1: List<String>, zoologist2: List<String>): Int {

    // Create an empty set to store the common species
    val commonSpecies = mutableSetOf<String>()

    // Loop through each species observed by zoologist1
    for (species1 in zoologist1) {
        // Loop through each species observed by zoologist2
        for (species2 in zoologist2) {
            // Check if the species observed by zoologist1 is the same as the species observed by zoologist2
            if (species1 == species2) {
                // Add the common species to the set
                commonSpecies.add(species1)
            }
        }
    }

    // Return the count of common species
    return commonSpecies.size
}
/**
 * This function takes in two lists of species observed by two zoologists and returns the count of common species.
 *
 * @param zoologist1 The list of species observed by the first zoologist.
 * @param zoologist2 The list of species observed by the second zoologist.
 * @return The count of common species observed by both zoologists.
 */
fun countCommonSpecies(zoologist1: List<String>, zoologist2: List<String>): Int {
/**
 * This function takes in two lists of species observed by two zoologists and returns the count of common species.
 *
 * @param zoologist1 The list of species observed by the first zoologist.
 * @param zoologist2 The list of species observed by the second zoologist.
 * @return The count of common species observed by both zoologists.
 */
fun countCommonSpecies(zoologist1: List<String>, zoologist2: List<String>): Int {

    // Create an empty set to store the common species
    val commonSpecies = mutableSetOf<String>()

    // Loop through each species observed by zoologist1
    for (species1 in zoologist1) {
        // Loop through each species observed by zoologist2
        for (species2 in zoologist2) {
            // Check if the species observed by zoologist1 is the same as the species observed by zoologist2
            if (species1 == species2) {
                // Add the common species to the set
                commonSpecies.add(species1)
            }
        }
    }

    // Return the count of common species
    return commonSpecies.size
}