/**
 * Two famous chefs have prepared their recipes and stored them in separate dictionaries.
 * Your task is to find the common ingredients that both chefs have used.
 *
 * @param chef1 Dictionary representing the recipes of chef1
 * @param chef2 Dictionary representing the recipes of chef2
 * @return List of ingredients common in both chefs' recipes
 */
fun findCommonIngredients(chef1: Map<String, String>, chef2: Map<String, String>): List<String> {

    val commonIngredients = mutableListOf<String>()

    for (ingredient in chef1.keys) {
        if (chef2.containsKey(ingredient)) {
            commonIngredients.add(ingredient)
        }
    }

    return commonIngredients
}
/**
 * Two famous chefs have prepared their recipes and stored them in separate dictionaries.
 * Your task is to find the common ingredients that both chefs have used.
 *
 * @param chef1 Dictionary representing the recipes of chef1
 * @param chef2 Dictionary representing the recipes of chef2
 * @return List of ingredients common in both chefs' recipes
 */
fun findCommonIngredients(chef1: Map<String, String>, chef2: Map<String, String>): List<String> {
/**
 * Two famous chefs have prepared their recipes and stored them in separate dictionaries.
 * Your task is to find the common ingredients that both chefs have used.
 *
 * @param chef1 Dictionary representing the recipes of chef1
 * @param chef2 Dictionary representing the recipes of chef2
 * @return List of ingredients common in both chefs' recipes
 */
fun findCommonIngredients(chef1: Map<String, String>, chef2: Map<String, String>): List<String> {

    val commonIngredients = mutableListOf<String>()

    for (ingredient in chef1.keys) {
        if (chef2.containsKey(ingredient)) {
            commonIngredients.add(ingredient)
        }
    }

    return commonIngredients
}