/**
 * Given two lists of songs, find the common songs by iterating over the lists and checking for equality.
 *
 * @param songs1 First list of songs.
 * @param songs2 Second list of songs.
 * @return A list containing the common songs found in both lists.
 *
 * Example:
 * val songs1 = listOf("Song A", "Song B", "Song C", "Song D")
 * val songs2 = listOf("Song C", "Song D", "Song E", "Song F")
 * println(findCommonSongs(songs1, songs2)) // Output: [Song C, Song D]
 */
fun findCommonSongs(songs1: List<String>, songs2: List<String>): List<String> {

    val commonSongs = mutableListOf<String>()

    for (song1 in songs1) {
        for (song2 in songs2) {
            if (song1 == song2) {
                commonSongs.add(song1)
            }
        }
    }

    return commonSongs
}
/**
 * Given two lists of songs, find the common songs by iterating over the lists and checking for equality.
 *
 * @param songs1 First list of songs.
 * @param songs2 Second list of songs.
 * @return A list containing the common songs found in both lists.
 *
 * Example:
 * val songs1 = listOf("Song A", "Song B", "Song C", "Song D")
 * val songs2 = listOf("Song C", "Song D", "Song E", "Song F")
 * println(findCommonSongs(songs1, songs2)) // Output: [Song C, Song D]
 */
fun findCommonSongs(songs1: List<String>, songs2: List<String>): List<String> {
/**
 * Given two lists of songs, find the common songs by iterating over the lists and checking for equality.
 *
 * @param songs1 First list of songs.
 * @param songs2 Second list of songs.
 * @return A list containing the common songs found in both lists.
 *
 * Example:
 * val songs1 = listOf("Song A", "Song B", "Song C", "Song D")
 * val songs2 = listOf("Song C", "Song D", "Song E", "Song F")
 * println(findCommonSongs(songs1, songs2)) // Output: [Song C, Song D]
 */
fun findCommonSongs(songs1: List<String>, songs2: List<String>): List<String> {

    val commonSongs = mutableListOf<String>()

    for (song1 in songs1) {
        for (song2 in songs2) {
            if (song1 == song2) {
                commonSongs.add(song1)
            }
        }
    }

    return commonSongs
}