/**
 * This function takes two lists of numbers and returns a list of common numbers using number line representation.
 *
 * @param numbers1 The first list of numbers.
 * @param numbers2 The second list of numbers.
 * @return A list of common numbers between the two input lists.
 *
 * Example:
 * numberLineEqualIntersection(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * numberLineEqualIntersection(listOf(10, 20, 30, 40, 50), listOf(20, 30, 40, 50, 60)) // [20, 30, 40, 50]
 */
fun numberLineEqualIntersection(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()

    for (number in numbers1) {
        if (number in numbers2) {
            commonNumbers.add(number)
        }
    }

    return commonNumbers
}
/**
 * This function takes two lists of numbers and returns a list of common numbers using number line representation.
 *
 * @param numbers1 The first list of numbers.
 * @param numbers2 The second list of numbers.
 * @return A list of common numbers between the two input lists.
 *
 * Example:
 * numberLineEqualIntersection(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * numberLineEqualIntersection(listOf(10, 20, 30, 40, 50), listOf(20, 30, 40, 50, 60)) // [20, 30, 40, 50]
 */
fun numberLineEqualIntersection(numbers1: List<Int>, numbers2: List<Int>): List<Int> {
/**
 * This function takes two lists of numbers and returns a list of common numbers using number line representation.
 *
 * @param numbers1 The first list of numbers.
 * @param numbers2 The second list of numbers.
 * @return A list of common numbers between the two input lists.
 *
 * Example:
 * numberLineEqualIntersection(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * numberLineEqualIntersection(listOf(10, 20, 30, 40, 50), listOf(20, 30, 40, 50, 60)) // [20, 30, 40, 50]
 */
fun numberLineEqualIntersection(numbers1: List<Int>, numbers2: List<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()

    for (number in numbers1) {
        if (number in numbers2) {
            commonNumbers.add(number)
        }
    }

    return commonNumbers
}