/**
 * A firefighter is trying to extinguish a fire that is located at a particular area in the city.
 * The firefighter needs to determine if there is enough water supply to put out the fire.
 *
 * Complete the function below to check if the water supply is sufficient to extinguish the fire.
 *
 * @param fireLocation The location of the fire in the city.
 * @param waterSupply A list representing the available water supply in each fire hydrant.
 * @return True if there is enough water supply to put out the fire, False otherwise.
 */
fun extinguishFire(fireLocation: String, waterSupply: Map<String, Int>): Boolean {

    var totalWaterSupply = 0

    // Check if there is any hydrant near the fire location
    if (fireLocation !in waterSupply) {
        return false
    }

    // Calculate the total water supply available from the nearby hydrants
    totalWaterSupply = waterSupply[fireLocation] ?: 0

    // Return False if the total water supply is less than the required amount to put out the fire
    if (totalWaterSupply < 1000) {
        return false
    }

    // Iterate over the water supply from each hydrant and check if there is enough water flow

    return true
}
/**
 * A firefighter is trying to extinguish a fire that is located at a particular area in the city.
 * The firefighter needs to determine if there is enough water supply to put out the fire.
 *
 * Complete the function below to check if the water supply is sufficient to extinguish the fire.
 *
 * @param fireLocation The location of the fire in the city.
 * @param waterSupply A list representing the available water supply in each fire hydrant.
 * @return True if there is enough water supply to put out the fire, False otherwise.
 */
fun extinguishFire(fireLocation: String, waterSupply: Map<String, Int>): Boolean {
/**
 * A firefighter is trying to extinguish a fire that is located at a particular area in the city.
 * The firefighter needs to determine if there is enough water supply to put out the fire.
 *
 * Complete the function below to check if the water supply is sufficient to extinguish the fire.
 *
 * @param fireLocation The location of the fire in the city.
 * @param waterSupply A list representing the available water supply in each fire hydrant.
 * @return True if there is enough water supply to put out the fire, False otherwise.
 */
fun extinguishFire(fireLocation: String, waterSupply: Map<String, Int>): Boolean {

    var totalWaterSupply = 0

    // Check if there is any hydrant near the fire location
    if (fireLocation !in waterSupply) {
        return false
    }

    // Calculate the total water supply available from the nearby hydrants
    totalWaterSupply = waterSupply[fireLocation] ?: 0

    // Return False if the total water supply is less than the required amount to put out the fire
    if (totalWaterSupply < 1000) {
        return false
    }

    // Iterate over the water supply from each hydrant and check if there is enough water flow

    return true
}