/**
 * The Chef wants to bake delicious cookies by following a recipe.
 * Complete the code below to bake cookies using the given recipe and ingredients.
 *
 * @param recipe A map representing the recipe with ingredient names as keys and required quantities as values.
 * @param ingredients A map representing the available ingredients with names as keys and quantities as values.
 *                    The quantities represent the units or grams of the ingredients.
 * @return true if the Chef has enough ingredients to bake cookies as per the recipe. Otherwise, false.
 */
fun bakeCookie(recipe: Map<String, Int>, ingredients: Map<String, Int>): Boolean {

    for ((ingredient, quantity) in recipe) {
        if (ingredient !in ingredients || ingredients[ingredient]!! < quantity) {
            // If any ingredient is missing or not available in required quantity, return false
            return false
        }
    }

    // Check if there are any extra ingredients not mentioned in the recipe
    for (ingredient in ingredients.keys) {
        if (ingredient !in recipe) {
            // If any extra ingredient is found, return false
            return false
        }
    }

    // If all ingredients are available in required quantities and no extra ingredients, return true
    return true
}
/**
 * The Chef wants to bake delicious cookies by following a recipe.
 * Complete the code below to bake cookies using the given recipe and ingredients.
 *
 * @param recipe A map representing the recipe with ingredient names as keys and required quantities as values.
 * @param ingredients A map representing the available ingredients with names as keys and quantities as values.
 *                    The quantities represent the units or grams of the ingredients.
 * @return true if the Chef has enough ingredients to bake cookies as per the recipe. Otherwise, false.
 */
fun bakeCookie(recipe: Map<String, Int>, ingredients: Map<String, Int>): Boolean {
/**
 * The Chef wants to bake delicious cookies by following a recipe.
 * Complete the code below to bake cookies using the given recipe and ingredients.
 *
 * @param recipe A map representing the recipe with ingredient names as keys and required quantities as values.
 * @param ingredients A map representing the available ingredients with names as keys and quantities as values.
 *                    The quantities represent the units or grams of the ingredients.
 * @return true if the Chef has enough ingredients to bake cookies as per the recipe. Otherwise, false.
 */
fun bakeCookie(recipe: Map<String, Int>, ingredients: Map<String, Int>): Boolean {

    for ((ingredient, quantity) in recipe) {
        if (ingredient !in ingredients || ingredients[ingredient]!! < quantity) {
            // If any ingredient is missing or not available in required quantity, return false
            return false
        }
    }

    // Check if there are any extra ingredients not mentioned in the recipe
    for (ingredient in ingredients.keys) {
        if (ingredient !in recipe) {
            // If any extra ingredient is found, return false
            return false
        }
    }

    // If all ingredients are available in required quantities and no extra ingredients, return true
    return true
}