/**
 * Given two lists of symptoms, this function finds the common symptoms between them.
 *
 * @param symptoms1 a list of symptoms for the first patient
 * @param symptoms2 a list of symptoms for the second patient
 * @return a list of common symptoms between the two patients
 */
fun findCommonSymptoms(symptoms1: List<String>, symptoms2: List<String>): List<String> {

    val commonSymptoms = mutableListOf<String>()

    for (symptom1 in symptoms1) {
        for (symptom2 in symptoms2) {
            if (symptom1 == symptom2) {
                commonSymptoms.add(symptom1)
            }
        }
    }

    return commonSymptoms
}
/**
 * Given two lists of symptoms, this function finds the common symptoms between them.
 *
 * @param symptoms1 a list of symptoms for the first patient
 * @param symptoms2 a list of symptoms for the second patient
 * @return a list of common symptoms between the two patients
 */
fun findCommonSymptoms(symptoms1: List<String>, symptoms2: List<String>): List<String> {
/**
 * Given two lists of symptoms, this function finds the common symptoms between them.
 *
 * @param symptoms1 a list of symptoms for the first patient
 * @param symptoms2 a list of symptoms for the second patient
 * @return a list of common symptoms between the two patients
 */
fun findCommonSymptoms(symptoms1: List<String>, symptoms2: List<String>): List<String> {

    val commonSymptoms = mutableListOf<String>()

    for (symptom1 in symptoms1) {
        for (symptom2 in symptoms2) {
            if (symptom1 == symptom2) {
                commonSymptoms.add(symptom1)
            }
        }
    }

    return commonSymptoms
}