/**
 * Given a dictionary of songs with their respective genres, find and return a list of songs that belong to the
 * specified target genre.
 *
 * @param dictionary A dictionary where the keys represent song titles (String) and the values represent the genres (String).
 * @param targetGenre The genre for which we want to find the songs.
 * @return A list of song titles that belong to the specified target genre.
 */
fun findSongs(dictionary: Map<String, String>, targetGenre: String): List<String> {

    // Initialize an empty list to store the songs
    val songsInGenre = mutableListOf<String>()

    // Iterate over the dictionary entries
    for ((song, genre) in dictionary) {
        // Check if the current song belongs to the target genre
        if (genre == targetGenre) {
            songsInGenre.add(song)
        }
    }

    return songsInGenre
}
/**
 * Given a dictionary of songs with their respective genres, find and return a list of songs that belong to the
 * specified target genre.
 *
 * @param dictionary A dictionary where the keys represent song titles (String) and the values represent the genres (String).
 * @param targetGenre The genre for which we want to find the songs.
 * @return A list of song titles that belong to the specified target genre.
 */
fun findSongs(dictionary: Map<String, String>, targetGenre: String): List<String> {
/**
 * Given a dictionary of songs with their respective genres, find and return a list of songs that belong to the
 * specified target genre.
 *
 * @param dictionary A dictionary where the keys represent song titles (String) and the values represent the genres (String).
 * @param targetGenre The genre for which we want to find the songs.
 * @return A list of song titles that belong to the specified target genre.
 */
fun findSongs(dictionary: Map<String, String>, targetGenre: String): List<String> {

    // Initialize an empty list to store the songs
    val songsInGenre = mutableListOf<String>()

    // Iterate over the dictionary entries
    for ((song, genre) in dictionary) {
        // Check if the current song belongs to the target genre
        if (genre == targetGenre) {
            songsInGenre.add(song)
        }
    }

    return songsInGenre
}