/**
 * Given two lists of items, find the intersection between them using identity comparison.
 * Return a new list containing only the items that appear in both lists.
 *
 * @param items1 The first list of items
 * @param items2 The second list of items
 * @return A new list containing the intersection of both input lists.
 */
fun calculateIntersection(items1: List<Int?>, items2: List<Int?>): List<Int?> {

    val intersection = mutableListOf<Int?>()
    for (item in items1) {
        if (item != null && item in items2 && item!! % 2 == 0) {
            intersection.add(item)
        }
    }
    return intersection
}
/**
 * Given two lists of items, find the intersection between them using identity comparison.
 * Return a new list containing only the items that appear in both lists.
 *
 * @param items1 The first list of items
 * @param items2 The second list of items
 * @return A new list containing the intersection of both input lists.
 */
fun calculateIntersection(items1: List<Int?>, items2: List<Int?>): List<Int?> {
/**
 * Given two lists of items, find the intersection between them using identity comparison.
 * Return a new list containing only the items that appear in both lists.
 *
 * @param items1 The first list of items
 * @param items2 The second list of items
 * @return A new list containing the intersection of both input lists.
 */
fun calculateIntersection(items1: List<Int?>, items2: List<Int?>): List<Int?> {

    val intersection = mutableListOf<Int?>()
    for (item in items1) {
        if (item != null && item in items2 && item!! % 2 == 0) {
            intersection.add(item)
        }
    }
    return intersection
}