/**
 * This function takes in two lists of numbers and returns a list of numbers that are common to both lists.
 *
 * @param numberList1 List of numbers
 * @param numberList2 List of numbers
 * @return List of common numbers between numberList1 and numberList2
 */
fun getCommonNumbers(numberList1: List<Int>, numberList2: List<Int>): List<Int> {

    // Convert numberList1 and numberList2 to sets
    val set1 = numberList1.toSet()
    val set2 = numberList2.toSet()

    // Calculate the intersection of set1 and set2 using the intersect function
    val commonNumbers = set1.intersect(set2).toList()

    return commonNumbers
}
/**
 * This function takes in two lists of numbers and returns a list of numbers that are common to both lists.
 *
 * @param numberList1 List of numbers
 * @param numberList2 List of numbers
 * @return List of common numbers between numberList1 and numberList2
 */
fun getCommonNumbers(numberList1: List<Int>, numberList2: List<Int>): List<Int> {
/**
 * This function takes in two lists of numbers and returns a list of numbers that are common to both lists.
 *
 * @param numberList1 List of numbers
 * @param numberList2 List of numbers
 * @return List of common numbers between numberList1 and numberList2
 */
fun getCommonNumbers(numberList1: List<Int>, numberList2: List<Int>): List<Int> {

    // Convert numberList1 and numberList2 to sets
    val set1 = numberList1.toSet()
    val set2 = numberList2.toSet()

    // Calculate the intersection of set1 and set2 using the intersect function
    val commonNumbers = set1.intersect(set2).toList()

    return commonNumbers
}