/**
 * Given a population set and a set of countries, this function checks if the population of each country
 * exceeds a certain threshold. It returns the names of the countries whose population exceeds the threshold.
 *
 * @param population A set containing the population of each country.
 * @param countries A set containing the names of the countries.
 * @return A set containing the names of the countries whose population exceeds the threshold.
 */
fun checkCountryPopulation(population: Set<Int>, countries: Set<String>): Set<String> {

    val threshold = 10000000
    val countriesAboveThreshold = mutableSetOf<String>()

    for ((index, country) in countries.withIndex()) {
        if (population.elementAt(index) > threshold) {
            countriesAboveThreshold.add(country)
        }
    }

    return countriesAboveThreshold
}
/**
 * Given a population set and a set of countries, this function checks if the population of each country
 * exceeds a certain threshold. It returns the names of the countries whose population exceeds the threshold.
 *
 * @param population A set containing the population of each country.
 * @param countries A set containing the names of the countries.
 * @return A set containing the names of the countries whose population exceeds the threshold.
 */
fun checkCountryPopulation(population: Set<Int>, countries: Set<String>): Set<String> {
/**
 * Given a population set and a set of countries, this function checks if the population of each country
 * exceeds a certain threshold. It returns the names of the countries whose population exceeds the threshold.
 *
 * @param population A set containing the population of each country.
 * @param countries A set containing the names of the countries.
 * @return A set containing the names of the countries whose population exceeds the threshold.
 */
fun checkCountryPopulation(population: Set<Int>, countries: Set<String>): Set<String> {

    val threshold = 10000000
    val countriesAboveThreshold = mutableSetOf<String>()

    for ((index, country) in countries.withIndex()) {
        if (population.elementAt(index) > threshold) {
            countriesAboveThreshold.add(country)
        }
    }

    return countriesAboveThreshold
}