/**
 * Given two arrays of geographic points, find the intersection of the two arrays.
 *
 * @param pointsA The first array of geographic points.
 * @param pointsB The second array of geographic points.
 * @return A new array containing the common geographic points from both input arrays.
 */
fun findIntersection(pointsA: List<String>, pointsB: List<String>): List<String> {

    val intersection = mutableListOf<String>()

    // Iterate through each point in the first array
    for (pointA in pointsA) {

        // Iterate through each point in the second array
        for (pointB in pointsB) {

            // Check if the two points are the same
            if (pointA == pointB) {

                // Check if the intersection already contains the point
                if (pointA !in intersection) {

                    // Add the point to the intersection array
                    intersection.add(pointA)
                }
            }
        }
    }

    return intersection
}
/**
 * Given two arrays of geographic points, find the intersection of the two arrays.
 *
 * @param pointsA The first array of geographic points.
 * @param pointsB The second array of geographic points.
 * @return A new array containing the common geographic points from both input arrays.
 */
fun findIntersection(pointsA: List<String>, pointsB: List<String>): List<String> {
/**
 * Given two arrays of geographic points, find the intersection of the two arrays.
 *
 * @param pointsA The first array of geographic points.
 * @param pointsB The second array of geographic points.
 * @return A new array containing the common geographic points from both input arrays.
 */
fun findIntersection(pointsA: List<String>, pointsB: List<String>): List<String> {

    val intersection = mutableListOf<String>()

    // Iterate through each point in the first array
    for (pointA in pointsA) {

        // Iterate through each point in the second array
        for (pointB in pointsB) {

            // Check if the two points are the same
            if (pointA == pointB) {

                // Check if the intersection already contains the point
                if (pointA !in intersection) {

                    // Add the point to the intersection array
                    intersection.add(pointA)
                }
            }
        }
    }

    return intersection
}