/**
 * This function finds the intersection of two number lines represented as lists.
 *
 * @param numbers1 The first number line represented as a list of integers.
 * @param numbers2 The second number line represented as a list of integers.
 * @return The intersection of the two number lines as a list of integers.
 */
fun numberLineIntersection(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()

    // Iterate through each number in numbers1
    for (num1 in numbers1) {
        // Check if the number is present in numbers2
        if (num1 in numbers2) {
            // If it is, add it to the intersection list
            intersection.add(num1)
        }
    }

    return intersection
}
/**
 * This function finds the intersection of two number lines represented as lists.
 *
 * @param numbers1 The first number line represented as a list of integers.
 * @param numbers2 The second number line represented as a list of integers.
 * @return The intersection of the two number lines as a list of integers.
 */
fun numberLineIntersection(numbers1: List<Int>, numbers2: List<Int>): List<Int> {
/**
 * This function finds the intersection of two number lines represented as lists.
 *
 * @param numbers1 The first number line represented as a list of integers.
 * @param numbers2 The second number line represented as a list of integers.
 * @return The intersection of the two number lines as a list of integers.
 */
fun numberLineIntersection(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val intersection = mutableListOf<Int>()

    // Iterate through each number in numbers1
    for (num1 in numbers1) {
        // Check if the number is present in numbers2
        if (num1 in numbers2) {
            // If it is, add it to the intersection list
            intersection.add(num1)
        }
    }

    return intersection
}