/**
 * This function filters out critical patients from a given list of patients based on a threshold.
 *
 * @param list_of_patients A list containing the individual number of patients for each day.
 * @param threshold The minimum number of patients required to be considered critical.
 * @return A list of critical patients based on the threshold.
 */
fun filterCriticalPatients(listOfPatients: List<Int>, threshold: Int): List<Int> {

    val criticalPatients = mutableListOf<Int>()
    for (day in listOfPatients) {
        if (day >= threshold) {
            criticalPatients.add(day)
        }
    }
    return criticalPatients
}
/**
 * This function filters out critical patients from a given list of patients based on a threshold.
 *
 * @param list_of_patients A list containing the individual number of patients for each day.
 * @param threshold The minimum number of patients required to be considered critical.
 * @return A list of critical patients based on the threshold.
 */
fun filterCriticalPatients(listOfPatients: List<Int>, threshold: Int): List<Int> {
/**
 * This function filters out critical patients from a given list of patients based on a threshold.
 *
 * @param list_of_patients A list containing the individual number of patients for each day.
 * @param threshold The minimum number of patients required to be considered critical.
 * @return A list of critical patients based on the threshold.
 */
fun filterCriticalPatients(listOfPatients: List<Int>, threshold: Int): List<Int> {

    val criticalPatients = mutableListOf<Int>()
    for (day in listOfPatients) {
        if (day >= threshold) {
            criticalPatients.add(day)
        }
    }
    return criticalPatients
}