/**
 * Given two dictionaries, 'speciesDict1' and 'speciesDict2', find all the species that are present in both dictionaries.
 *
 * @param speciesDict1 A dictionary representing the first set of species and corresponding information.
 * @param speciesDict2 A dictionary representing the second set of species and corresponding information.
 * @return A list of species that are common to both dictionaries.
 */
fun findCommonSpecies(speciesDict1: Map<String, Any>, speciesDict2: Map<String, Any>): List<String> {

    val commonSpecies = mutableListOf<String>()

    // Iterate over the keys in the first dictionary
    for ((species, value) in speciesDict1) {
        // Check if the species exists in both dictionaries and their values are not equal
        if (speciesDict2.containsKey(species) && speciesDict1[species] != speciesDict2[species]) {
            // Append the species to the common species list
            commonSpecies.add(species)
        }
    }

    return commonSpecies
}
/**
 * Given two dictionaries, 'speciesDict1' and 'speciesDict2', find all the species that are present in both dictionaries.
 *
 * @param speciesDict1 A dictionary representing the first set of species and corresponding information.
 * @param speciesDict2 A dictionary representing the second set of species and corresponding information.
 * @return A list of species that are common to both dictionaries.
 */
fun findCommonSpecies(speciesDict1: Map<String, Any>, speciesDict2: Map<String, Any>): List<String> {
/**
 * Given two dictionaries, 'speciesDict1' and 'speciesDict2', find all the species that are present in both dictionaries.
 *
 * @param speciesDict1 A dictionary representing the first set of species and corresponding information.
 * @param speciesDict2 A dictionary representing the second set of species and corresponding information.
 * @return A list of species that are common to both dictionaries.
 */
fun findCommonSpecies(speciesDict1: Map<String, Any>, speciesDict2: Map<String, Any>): List<String> {

    val commonSpecies = mutableListOf<String>()

    // Iterate over the keys in the first dictionary
    for ((species, value) in speciesDict1) {
        // Check if the species exists in both dictionaries and their values are not equal
        if (speciesDict2.containsKey(species) && speciesDict1[species] != speciesDict2[species]) {
            // Append the species to the common species list
            commonSpecies.add(species)
        }
    }

    return commonSpecies
}