/**
 * This function takes a dictionary of chefs and a tuple of recipe ingredients.
 * It returns the list of chefs who can prepare a dish using those ingredients.
 *
 * @param chefDictionary A dictionary containing chef names as keys and their respective recipes as values.
 * @param recipeTuple A tuple containing the ingredients required for a dish.
 * @return A list of chefs who can prepare the dish.
 */
fun getChefRecipe(chefDictionary: Map<String, Map<String, Int>>, recipeTuple: List<String>): List<String> {

    val chefs = mutableListOf<String>()

    for ((chef, recipe) in chefDictionary) {
        val ingredients = recipe.keys
        if (ingredients.all { ingredient -> ingredient in recipeTuple }) {
            chefs.add(chef)
        }
    }

    return chefs
}

// Example usage
val chefDict = mapOf(
    "Master Chef" to mapOf(
        "onion" to 1,
        "garlic" to 2,
        "tomato" to 2,
        "chicken" to 500,
        "salt" to 1,
        "pepper" to 1
    ),
    "Sous Chef" to mapOf(
        "garlic" to 4,
        "tomato" to 3,
        "shrimp" to 300,
        "salt" to 2
    )
)
/**
 * This function takes a dictionary of chefs and a tuple of recipe ingredients.
 * It returns the list of chefs who can prepare a dish using those ingredients.
 *
 * @param chefDictionary A dictionary containing chef names as keys and their respective recipes as values.
 * @param recipeTuple A tuple containing the ingredients required for a dish.
 * @return A list of chefs who can prepare the dish.
 */
fun getChefRecipe(chefDictionary: Map<String, Map<String, Int>>, recipeTuple: List<String>): List<String> {
/**
 * This function takes a dictionary of chefs and a tuple of recipe ingredients.
 * It returns the list of chefs who can prepare a dish using those ingredients.
 *
 * @param chefDictionary A dictionary containing chef names as keys and their respective recipes as values.
 * @param recipeTuple A tuple containing the ingredients required for a dish.
 * @return A list of chefs who can prepare the dish.
 */
fun getChefRecipe(chefDictionary: Map<String, Map<String, Int>>, recipeTuple: List<String>): List<String> {

    val chefs = mutableListOf<String>()

    for ((chef, recipe) in chefDictionary) {
        val ingredients = recipe.keys
        if (ingredients.all { ingredient -> ingredient in recipeTuple }) {
            chefs.add(chef)
        }
    }

    return chefs
}

// Example usage
val chefDict = mapOf(
    "Master Chef" to mapOf(
        "onion" to 1,
        "garlic" to 2,
        "tomato" to 2,
        "chicken" to 500,
        "salt" to 1,
        "pepper" to 1
    ),
    "Sous Chef" to mapOf(
        "garlic" to 4,
        "tomato" to 3,
        "shrimp" to 300,
        "salt" to 2
    )
)