/**
 * This function takes in two lists of numbers and returns a new list containing only the common elements between both lists.
 *
 * @param list1 the first list of numbers
 * @param list2 the second list of numbers
 * @return a list of numbers containing the common elements between list1 and list2
 */
fun findIntersection(list1: List<Int>, list2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()
    for (num in list1) {
        if (num in list2) {
            intersection.add(num)
        }
    }
    return intersection
}
/**
 * This function takes in two lists of numbers and returns a new list containing only the common elements between both lists.
 *
 * @param list1 the first list of numbers
 * @param list2 the second list of numbers
 * @return a list of numbers containing the common elements between list1 and list2
 */
fun findIntersection(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * This function takes in two lists of numbers and returns a new list containing only the common elements between both lists.
 *
 * @param list1 the first list of numbers
 * @param list2 the second list of numbers
 * @return a list of numbers containing the common elements between list1 and list2
 */
fun findIntersection(list1: List<Int>, list2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()
    for (num in list1) {
        if (num in list2) {
            intersection.add(num)
        }
    }
    return intersection
}