/**
 * Returns the intersection of two lists by using addition assignment operator and subtraction.
 */
fun findIntersection(arr1: MutableList<Int>, arr2: MutableList<Int>): MutableList<Int> {

    // Initialize an empty list to store the intersection
    val intersection = mutableListOf<Int>()

    // Iterate over each element in arr1
    val iterator = arr1.iterator()
    while (iterator.hasNext()) {
        val element = iterator.next()
        try {
            // Add the element to intersection if it is present in both arr1 and arr2
            arr2.remove(element)
            intersection.add(element)
        } catch (e: NoSuchElementException) {
            // Ignore elements not present in arr2
        }
    }

    // Return the intersection list
    return intersection
}
/**
 * Returns the intersection of two lists by using addition assignment operator and subtraction.
 */
fun findIntersection(arr1: MutableList<Int>, arr2: MutableList<Int>): MutableList<Int> {
/**
 * Returns the intersection of two lists by using addition assignment operator and subtraction.
 */
fun findIntersection(arr1: MutableList<Int>, arr2: MutableList<Int>): MutableList<Int> {

    // Initialize an empty list to store the intersection
    val intersection = mutableListOf<Int>()

    // Iterate over each element in arr1
    val iterator = arr1.iterator()
    while (iterator.hasNext()) {
        val element = iterator.next()
        try {
            // Add the element to intersection if it is present in both arr1 and arr2
            arr2.remove(element)
            intersection.add(element)
        } catch (e: NoSuchElementException) {
            // Ignore elements not present in arr2
        }
    }

    // Return the intersection list
    return intersection
}