/**
 * Given an artist and a list of songs, find the songs that contain the artist's name
 * and concatenate each song title with the artist's name.
 *
 * @param artist The musician's name.
 * @param songs A list of song titles.
 * @return A list of strings where each string contains the artist's name concatenated with a song title.
 *
 * Example:
 * findFavoriteSongs("Eminem", listOf("Lose Yourself", "Rap God", "Not Afraid"))
 * Output: ["Eminem - Lose Yourself", "Eminem - Rap God", "Eminem - Not Afraid"]
 */
fun findFavoriteSongs(artist: String, songs: List<String>): List<String> {

    val favoriteSongs = mutableListOf<String>()

    for (song in songs) {
        if (artist in song) {
            favoriteSongs.add("$artist - $song")
        }
    }

    return favoriteSongs
}
/**
 * Given an artist and a list of songs, find the songs that contain the artist's name
 * and concatenate each song title with the artist's name.
 *
 * @param artist The musician's name.
 * @param songs A list of song titles.
 * @return A list of strings where each string contains the artist's name concatenated with a song title.
 *
 * Example:
 * findFavoriteSongs("Eminem", listOf("Lose Yourself", "Rap God", "Not Afraid"))
 * Output: ["Eminem - Lose Yourself", "Eminem - Rap God", "Eminem - Not Afraid"]
 */
fun findFavoriteSongs(artist: String, songs: List<String>): List<String> {
/**
 * Given an artist and a list of songs, find the songs that contain the artist's name
 * and concatenate each song title with the artist's name.
 *
 * @param artist The musician's name.
 * @param songs A list of song titles.
 * @return A list of strings where each string contains the artist's name concatenated with a song title.
 *
 * Example:
 * findFavoriteSongs("Eminem", listOf("Lose Yourself", "Rap God", "Not Afraid"))
 * Output: ["Eminem - Lose Yourself", "Eminem - Rap God", "Eminem - Not Afraid"]
 */
fun findFavoriteSongs(artist: String, songs: List<String>): List<String> {

    val favoriteSongs = mutableListOf<String>()

    for (song in songs) {
        if (artist in song) {
            favoriteSongs.add("$artist - $song")
        }
    }

    return favoriteSongs
}