/**
 * This function takes two lists containing artists and their respective number of songs,
 * and merges them into a single list, discarding any duplicate artists.
 *
 * @param artist1 List of artists
 * @param artist2 Another list of artists
 * @return Merged list of artists with no duplicates
 */
fun copyMergeLists(artist1: List<String>, artist2: List<String>): List<String> {

    // Check if both lists are empty
    if (artist1.isEmpty() && artist2.isEmpty()) {
        return emptyList()
    }

    // Create a copy of the first list
    val mergedList = artist1.toMutableList()

    // Iterate over the second list and add each artist if it doesn't already exist
    for (artist in artist2) {
        if (artist !in mergedList) {
            mergedList.add(artist)
        }
    }

    // Return the merged list
    return mergedList
}
/**
 * This function takes two lists containing artists and their respective number of songs,
 * and merges them into a single list, discarding any duplicate artists.
 *
 * @param artist1 List of artists
 * @param artist2 Another list of artists
 * @return Merged list of artists with no duplicates
 */
fun copyMergeLists(artist1: List<String>, artist2: List<String>): List<String> {
/**
 * This function takes two lists containing artists and their respective number of songs,
 * and merges them into a single list, discarding any duplicate artists.
 *
 * @param artist1 List of artists
 * @param artist2 Another list of artists
 * @return Merged list of artists with no duplicates
 */
fun copyMergeLists(artist1: List<String>, artist2: List<String>): List<String> {

    // Check if both lists are empty
    if (artist1.isEmpty() && artist2.isEmpty()) {
        return emptyList()
    }

    // Create a copy of the first list
    val mergedList = artist1.toMutableList()

    // Iterate over the second list and add each artist if it doesn't already exist
    for (artist in artist2) {
        if (artist !in mergedList) {
            mergedList.add(artist)
        }
    }

    // Return the merged list
    return mergedList
}