/**
 * Physician's task is to update the status of patients in the given list.
 *
 * @param patientList a list of patients
 * @param status the status that needs to be updated
 * @return A modified list with updated patient statuses.
 */
fun updatePatientStatus(patientList: MutableList<String>, status: String): MutableList<String> {

    for (i in patientList.indices) {
        if (patientList[i] in listOf("critical", "serious")) {
            patientList[i] = status
        }
    }
    return patientList
}
/**
 * Physician's task is to update the status of patients in the given list.
 *
 * @param patientList a list of patients
 * @param status the status that needs to be updated
 * @return A modified list with updated patient statuses.
 */
fun updatePatientStatus(patientList: MutableList<String>, status: String): MutableList<String> {
/**
 * Physician's task is to update the status of patients in the given list.
 *
 * @param patientList a list of patients
 * @param status the status that needs to be updated
 * @return A modified list with updated patient statuses.
 */
fun updatePatientStatus(patientList: MutableList<String>, status: String): MutableList<String> {

    for (i in patientList.indices) {
        if (patientList[i] in listOf("critical", "serious")) {
            patientList[i] = status
        }
    }
    return patientList
}