/**
 * This function takes in two arrays 'arr1' and 'arr2' and returns
 * a list of elements that are present in both arrays, using identity comparison
 * and greater than or equal condition. The function solves the exercise with
 * a complexity of O(n^2), making it a challenging exercise to solve efficiently.
 *
 * @param arr1 A list of integers
 * @param arr2 A list of integers
 * @return A list of integers representing the intersection of arr1 and arr2
 */
fun intersectionIdentityGreaterOrEqual(arr1: List<Int>, arr2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()
    for (num1 in arr1) {
        for (num2 in arr2) {
            if (num1 === num2 && num1 >= num2) {
                intersection.add(num1)
            }
        }
    }
    return intersection
}
/**
 * This function takes in two arrays 'arr1' and 'arr2' and returns
 * a list of elements that are present in both arrays, using identity comparison
 * and greater than or equal condition. The function solves the exercise with
 * a complexity of O(n^2), making it a challenging exercise to solve efficiently.
 *
 * @param arr1 A list of integers
 * @param arr2 A list of integers
 * @return A list of integers representing the intersection of arr1 and arr2
 */
fun intersectionIdentityGreaterOrEqual(arr1: List<Int>, arr2: List<Int>): List<Int> {
/**
 * This function takes in two arrays 'arr1' and 'arr2' and returns
 * a list of elements that are present in both arrays, using identity comparison
 * and greater than or equal condition. The function solves the exercise with
 * a complexity of O(n^2), making it a challenging exercise to solve efficiently.
 *
 * @param arr1 A list of integers
 * @param arr2 A list of integers
 * @return A list of integers representing the intersection of arr1 and arr2
 */
fun intersectionIdentityGreaterOrEqual(arr1: List<Int>, arr2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()
    for (num1 in arr1) {
        for (num2 in arr2) {
            if (num1 === num2 && num1 >= num2) {
                intersection.add(num1)
            }
        }
    }
    return intersection
}