/**
 * A Chef is preparing a meal. However, the ingredients provided may not be suitable for certain dietary restrictions.
 * You need to implement a code that checks if the meal can be prepared based on the ingredients and the dietary restrictions.
 *
 * @param ingredients a list of strings representing the ingredients needed for the meal
 * @return true if the meal can be prepared without violating any dietary restrictions, false otherwise
 *
 * Example:
 * cookMeal(listOf("fish", "tomato", "lettuce", "dairy")) =>
 * Restrictions:
 * - No animal products allowed
 * - No gluten allowed
 *
 * The meal cannot be prepared because fish is an animal product.
 * Expected output: false
 */
fun cookMeal(ingredients: List<String>): Boolean {

    val restrictions = mapOf(
        "No animal products allowed" to listOf("meat", "fish", "dairy", "eggs"),
        "No gluten allowed" to listOf("bread", "pasta", "flour")
    )

    for (ingredient in ingredients) {
        for (restriction in restrictions) {
            if (ingredient in restriction.value) {
                return false
            }
        }
    }

    return true  // If we reach this point, the meal can be prepared
}
/**
 * A Chef is preparing a meal. However, the ingredients provided may not be suitable for certain dietary restrictions.
 * You need to implement a code that checks if the meal can be prepared based on the ingredients and the dietary restrictions.
 *
 * @param ingredients a list of strings representing the ingredients needed for the meal
 * @return true if the meal can be prepared without violating any dietary restrictions, false otherwise
 *
 * Example:
 * cookMeal(listOf("fish", "tomato", "lettuce", "dairy")) =>
 * Restrictions:
 * - No animal products allowed
 * - No gluten allowed
 *
 * The meal cannot be prepared because fish is an animal product.
 * Expected output: false
 */
fun cookMeal(ingredients: List<String>): Boolean {
/**
 * A Chef is preparing a meal. However, the ingredients provided may not be suitable for certain dietary restrictions.
 * You need to implement a code that checks if the meal can be prepared based on the ingredients and the dietary restrictions.
 *
 * @param ingredients a list of strings representing the ingredients needed for the meal
 * @return true if the meal can be prepared without violating any dietary restrictions, false otherwise
 *
 * Example:
 * cookMeal(listOf("fish", "tomato", "lettuce", "dairy")) =>
 * Restrictions:
 * - No animal products allowed
 * - No gluten allowed
 *
 * The meal cannot be prepared because fish is an animal product.
 * Expected output: false
 */
fun cookMeal(ingredients: List<String>): Boolean {

    val restrictions = mapOf(
        "No animal products allowed" to listOf("meat", "fish", "dairy", "eggs"),
        "No gluten allowed" to listOf("bread", "pasta", "flour")
    )

    for (ingredient in ingredients) {
        for (restriction in restrictions) {
            if (ingredient in restriction.value) {
                return false
            }
        }
    }

    return true  // If we reach this point, the meal can be prepared
}