/**
 * This function finds the intersection of two lists using left and right shift operators.
 * It also copies the resulting intersection list into a new variable.
 *
 * @param list1 A list of integers.
 * @param list2 A list of integers.
 * @return A list containing the common elements between list1 and list2.
 */
fun intersectionShiftCopy(list1: List<Int>, list2: List<Int>): List<Int> {

    // Find the intersection of list1 and list2 using shift operators
    val intersection = list1.filter { x -> (x shl 1) in list2 || (x shr 1) in list2 }

    // Copy the intersection list into a new variable
    val intersectionCopy = intersection.toMutableList()

    return intersectionCopy
}
/**
 * This function finds the intersection of two lists using left and right shift operators.
 * It also copies the resulting intersection list into a new variable.
 *
 * @param list1 A list of integers.
 * @param list2 A list of integers.
 * @return A list containing the common elements between list1 and list2.
 */
fun intersectionShiftCopy(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * This function finds the intersection of two lists using left and right shift operators.
 * It also copies the resulting intersection list into a new variable.
 *
 * @param list1 A list of integers.
 * @param list2 A list of integers.
 * @return A list containing the common elements between list1 and list2.
 */
fun intersectionShiftCopy(list1: List<Int>, list2: List<Int>): List<Int> {

    // Find the intersection of list1 and list2 using shift operators
    val intersection = list1.filter { x -> (x shl 1) in list2 || (x shr 1) in list2 }

    // Copy the intersection list into a new variable
    val intersectionCopy = intersection.toMutableList()

    return intersectionCopy
}