/**
 * Given a list of notes represented by their MIDI numbers and a targetNote, delete all occurrences of the targetNote from the list.
 *
 * @param notes A list of MIDI numbers representing the notes
 * @param targetNote The MIDI number of the note to delete
 * @return The updated list of notes with all occurrences of the targetNote deleted
 */
fun deleteNotes(notes: MutableList<Int>, targetNote: Int): List<Int> {

    while (true) {
        if (targetNote !in notes) {
            break
        }
        notes.remove(targetNote)
    }
    return notes
}
/**
 * Given a list of notes represented by their MIDI numbers and a targetNote, delete all occurrences of the targetNote from the list.
 *
 * @param notes A list of MIDI numbers representing the notes
 * @param targetNote The MIDI number of the note to delete
 * @return The updated list of notes with all occurrences of the targetNote deleted
 */
fun deleteNotes(notes: MutableList<Int>, targetNote: Int): List<Int> {
/**
 * Given a list of notes represented by their MIDI numbers and a targetNote, delete all occurrences of the targetNote from the list.
 *
 * @param notes A list of MIDI numbers representing the notes
 * @param targetNote The MIDI number of the note to delete
 * @return The updated list of notes with all occurrences of the targetNote deleted
 */
fun deleteNotes(notes: MutableList<Int>, targetNote: Int): List<Int> {

    while (true) {
        if (targetNote !in notes) {
            break
        }
        notes.remove(targetNote)
    }
    return notes
}