/**
 * This function takes in the exercise programs of two patients and returns the common exercises they both have.
 *
 * @param patient1 List of exercises for patient 1.
 * @param patient2 List of exercises for patient 2.
 * @return List of exercises that are common to both patients.
 */
fun findCommonExercises(patient1: List<String>, patient2: List<String>): List<String> {

    val commonExercises = mutableListOf<String>()

    // Iterate through patient 1 exercises
    for (exercise in patient1) {
        // Check if the exercise is also present in patient 2 exercises
        if (exercise in patient2) {
            // Add the exercise to commonExercises list
            commonExercises.add(exercise)
        }
    }

    return commonExercises
}
/**
 * This function takes in the exercise programs of two patients and returns the common exercises they both have.
 *
 * @param patient1 List of exercises for patient 1.
 * @param patient2 List of exercises for patient 2.
 * @return List of exercises that are common to both patients.
 */
fun findCommonExercises(patient1: List<String>, patient2: List<String>): List<String> {
/**
 * This function takes in the exercise programs of two patients and returns the common exercises they both have.
 *
 * @param patient1 List of exercises for patient 1.
 * @param patient2 List of exercises for patient 2.
 * @return List of exercises that are common to both patients.
 */
fun findCommonExercises(patient1: List<String>, patient2: List<String>): List<String> {

    val commonExercises = mutableListOf<String>()

    // Iterate through patient 1 exercises
    for (exercise in patient1) {
        // Check if the exercise is also present in patient 2 exercises
        if (exercise in patient2) {
            // Add the exercise to commonExercises list
            commonExercises.add(exercise)
        }
    }

    return commonExercises
}