/**
 * This function checks whether the given cooking tuple can be cooked in the limited chef's space available.
 * The cooking tuple consists of the space required for each ingredient, and the chef_space represents the total available space.
 *
 * @param cookingTuple A list of integers representing the space required for each ingredient.
 * @param chefSpace The total available space in the chef's kitchen.
 * @return True if the cooking tuple can be cooked within the available chef's space, False otherwise.
 */
fun canCookInChefSpace(cookingTuple: List<Int>, chefSpace: Int): Boolean {

    var remainingSpace = chefSpace

    for (ingredientSpace in cookingTuple) {
        remainingSpace -= ingredientSpace
        if (remainingSpace < 0) {
            return false
        }
    }

    return true
}
/**
 * This function checks whether the given cooking tuple can be cooked in the limited chef's space available.
 * The cooking tuple consists of the space required for each ingredient, and the chef_space represents the total available space.
 *
 * @param cookingTuple A list of integers representing the space required for each ingredient.
 * @param chefSpace The total available space in the chef's kitchen.
 * @return True if the cooking tuple can be cooked within the available chef's space, False otherwise.
 */
fun canCookInChefSpace(cookingTuple: List<Int>, chefSpace: Int): Boolean {
/**
 * This function checks whether the given cooking tuple can be cooked in the limited chef's space available.
 * The cooking tuple consists of the space required for each ingredient, and the chef_space represents the total available space.
 *
 * @param cookingTuple A list of integers representing the space required for each ingredient.
 * @param chefSpace The total available space in the chef's kitchen.
 * @return True if the cooking tuple can be cooked within the available chef's space, False otherwise.
 */
fun canCookInChefSpace(cookingTuple: List<Int>, chefSpace: Int): Boolean {

    var remainingSpace = chefSpace

    for (ingredientSpace in cookingTuple) {
        remainingSpace -= ingredientSpace
        if (remainingSpace < 0) {
            return false
        }
    }

    return true
}