/**
 * Given a dictionary of psychological disorders and their corresponding symptoms, modify the values of the dictionary
 * to include additional common symptoms associated with each disorder. The modified dictionary should be returned.
 *
 * @param dictionary A dictionary with psychological disorders as keys and their corresponding symptoms as values
 * @return The modified dictionary with additional common symptoms
 */
fun modifyDictItems(dictionary: MutableMap<String, MutableList<String>>): MutableMap<String, MutableList<String>> {

    val commonSymptoms = mapOf(
        "Depression" to mutableListOf("Hopelessness", "Loss of interest", "Insomnia"),
        "Anxiety" to mutableListOf("Excessive worry", "Restlessness", "Panic attacks"),
        "Bipolar disorder" to mutableListOf("Manic episodes", "Depressive episodes", "Impulsive behavior"),
        "Schizophrenia" to mutableListOf("Hallucinations", "Delusions", "Disorganized speech")
    )

    // Iterate over each item in the dictionary
    for ((disorder, symptoms) in dictionary) {
        // Check if the disorder exists in the commonSymptoms dictionary
        if (disorder in commonSymptoms) {
            // Extend the existing symptoms list with additional common symptoms
            symptoms.addAll(commonSymptoms[disorder]!!)
        }
    }

    return dictionary
}
/**
 * Given a dictionary of psychological disorders and their corresponding symptoms, modify the values of the dictionary
 * to include additional common symptoms associated with each disorder. The modified dictionary should be returned.
 *
 * @param dictionary A dictionary with psychological disorders as keys and their corresponding symptoms as values
 * @return The modified dictionary with additional common symptoms
 */
fun modifyDictItems(dictionary: MutableMap<String, MutableList<String>>): MutableMap<String, MutableList<String>> {
/**
 * Given a dictionary of psychological disorders and their corresponding symptoms, modify the values of the dictionary
 * to include additional common symptoms associated with each disorder. The modified dictionary should be returned.
 *
 * @param dictionary A dictionary with psychological disorders as keys and their corresponding symptoms as values
 * @return The modified dictionary with additional common symptoms
 */
fun modifyDictItems(dictionary: MutableMap<String, MutableList<String>>): MutableMap<String, MutableList<String>> {

    val commonSymptoms = mapOf(
        "Depression" to mutableListOf("Hopelessness", "Loss of interest", "Insomnia"),
        "Anxiety" to mutableListOf("Excessive worry", "Restlessness", "Panic attacks"),
        "Bipolar disorder" to mutableListOf("Manic episodes", "Depressive episodes", "Impulsive behavior"),
        "Schizophrenia" to mutableListOf("Hallucinations", "Delusions", "Disorganized speech")
    )

    // Iterate over each item in the dictionary
    for ((disorder, symptoms) in dictionary) {
        // Check if the disorder exists in the commonSymptoms dictionary
        if (disorder in commonSymptoms) {
            // Extend the existing symptoms list with additional common symptoms
            symptoms.addAll(commonSymptoms[disorder]!!)
        }
    }

    return dictionary
}