/**
 * This function takes in two lists as arguments: artistList and selectedList.
 * It returns a new list containing the intersection of the negative integers present in both the artistList and selectedList.
 */
fun findNegativeIntersection(artistList: List<Int>, selectedList: List<Int>): List<Int> {

    val negativeIntersection = mutableListOf<Int>()
    
    // Find negative integers in artistList
    val artistNegatives = artistList.filter { it < 0 }
    
    // Find negative integers in selectedList
    val selectedNegatives = selectedList.filter { it < 0 }
    
    // Check for intersection
    for (num in artistNegatives) {
        if (num in selectedNegatives && num !in negativeIntersection) {
            negativeIntersection.add(num)
        }
    }
    
    return negativeIntersection
}
/**
 * This function takes in two lists as arguments: artistList and selectedList.
 * It returns a new list containing the intersection of the negative integers present in both the artistList and selectedList.
 */
fun findNegativeIntersection(artistList: List<Int>, selectedList: List<Int>): List<Int> {
/**
 * This function takes in two lists as arguments: artistList and selectedList.
 * It returns a new list containing the intersection of the negative integers present in both the artistList and selectedList.
 */
fun findNegativeIntersection(artistList: List<Int>, selectedList: List<Int>): List<Int> {

    val negativeIntersection = mutableListOf<Int>()
    
    // Find negative integers in artistList
    val artistNegatives = artistList.filter { it < 0 }
    
    // Find negative integers in selectedList
    val selectedNegatives = selectedList.filter { it < 0 }
    
    // Check for intersection
    for (num in artistNegatives) {
        if (num in selectedNegatives && num !in negativeIntersection) {
            negativeIntersection.add(num)
        }
    }
    
    return negativeIntersection
}