/**
 * Given two lists, find the intersection of the two lists and return it.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing the intersection of the two input lists
 */
fun intersectionOfLists(list1: List<Int>, list2: List<Int>): List<Int> {

    // Use set intersection to find common elements between the two lists
    val intersection = list1.intersect(list2).toList()

    // Sort the intersection in ascending order
    return intersection.sorted()
}
/**
 * Given two lists, find the intersection of the two lists and return it.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing the intersection of the two input lists
 */
fun intersectionOfLists(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * Given two lists, find the intersection of the two lists and return it.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing the intersection of the two input lists
 */
fun intersectionOfLists(list1: List<Int>, list2: List<Int>): List<Int> {

    // Use set intersection to find common elements between the two lists
    val intersection = list1.intersect(list2).toList()

    // Sort the intersection in ascending order
    return intersection.sorted()
}