/**
 * Given two lists of integers, find the index of the first common element
 * between the two lists. If there is no common element, return -1.
 */
fun findIntersectionIndex(list1: List<Int>, list2: List<Int>): Int {

    val intersection = list1.filterIndexed { index, element -> element in list2 }
    return if (intersection.isNotEmpty()) intersection[0] else -1
}
/**
 * Given two lists of integers, find the index of the first common element
 * between the two lists. If there is no common element, return -1.
 */
fun findIntersectionIndex(list1: List<Int>, list2: List<Int>): Int {
/**
 * Given two lists of integers, find the index of the first common element
 * between the two lists. If there is no common element, return -1.
 */
fun findIntersectionIndex(list1: List<Int>, list2: List<Int>): Int {

    val intersection = list1.filterIndexed { index, element -> element in list2 }
    return if (intersection.isNotEmpty()) intersection[0] else -1
}