/**
 * Given a dictionary of notes played by a musician, find the unique notes.
 *
 * @param notesDict A dictionary where the keys are the names of the notes played and the values are the count of each note.
 * @return A list containing the unique notes played by the musician.
 */
fun findUniqueNotes(notesDict: MutableMap<String, Int>): List<String> {

    // Initialize an empty set to store unique notes
    val uniqueNotes = mutableSetOf<String>()

    // Iterate over each note in the dictionary
    for (note in notesDict.keys.toSet()) {
        // Subtract 1 from the count of the current note in the dictionary
        notesDict[note] = notesDict.getOrDefault(note, 0) - 1

        // If the count of the current note becomes 0, remove it from the dictionary
        if (notesDict[note] == 0) {
            notesDict.remove(note)
        }

        // Add the current note to the set of unique notes
        uniqueNotes.add(note)
    }

    // Return the unique notes as a list
    return uniqueNotes.toList()
}
/**
 * Given a dictionary of notes played by a musician, find the unique notes.
 *
 * @param notesDict A dictionary where the keys are the names of the notes played and the values are the count of each note.
 * @return A list containing the unique notes played by the musician.
 */
fun findUniqueNotes(notesDict: MutableMap<String, Int>): List<String> {
/**
 * Given a dictionary of notes played by a musician, find the unique notes.
 *
 * @param notesDict A dictionary where the keys are the names of the notes played and the values are the count of each note.
 * @return A list containing the unique notes played by the musician.
 */
fun findUniqueNotes(notesDict: MutableMap<String, Int>): List<String> {

    // Initialize an empty set to store unique notes
    val uniqueNotes = mutableSetOf<String>()

    // Iterate over each note in the dictionary
    for (note in notesDict.keys.toSet()) {
        // Subtract 1 from the count of the current note in the dictionary
        notesDict[note] = notesDict.getOrDefault(note, 0) - 1

        // If the count of the current note becomes 0, remove it from the dictionary
        if (notesDict[note] == 0) {
            notesDict.remove(note)
        }

        // Add the current note to the set of unique notes
        uniqueNotes.add(note)
    }

    // Return the unique notes as a list
    return uniqueNotes.toList()
}