/**
 * Chef1 and Chef2 are lists containing ingredients for their respective dishes.
 * Your task is to find the common ingredients between their dishes and return them as a set.
 */
fun findCommonIngredients(chef1: List<String>, chef2: List<String>): Set<String> {

    val commonIngredients = mutableSetOf<String>()

    // Iterating through the ingredients of Chef1's dish
    for (ingredient1 in chef1) {
        // Iterating through the ingredients of Chef2's dish
        for (ingredient2 in chef2) {
            // Checking if the ingredients match
            if (ingredient1 == ingredient2) {
                // Adding the common ingredient to the set
                commonIngredients.add(ingredient1)
            }
        }
    }

    return commonIngredients
}
/**
 * Chef1 and Chef2 are lists containing ingredients for their respective dishes.
 * Your task is to find the common ingredients between their dishes and return them as a set.
 */
fun findCommonIngredients(chef1: List<String>, chef2: List<String>): Set<String> {
/**
 * Chef1 and Chef2 are lists containing ingredients for their respective dishes.
 * Your task is to find the common ingredients between their dishes and return them as a set.
 */
fun findCommonIngredients(chef1: List<String>, chef2: List<String>): Set<String> {

    val commonIngredients = mutableSetOf<String>()

    // Iterating through the ingredients of Chef1's dish
    for (ingredient1 in chef1) {
        // Iterating through the ingredients of Chef2's dish
        for (ingredient2 in chef2) {
            // Checking if the ingredients match
            if (ingredient1 == ingredient2) {
                // Adding the common ingredient to the set
                commonIngredients.add(ingredient1)
            }
        }
    }

    return commonIngredients
}