/**
 * Given two lists 'lst1' and 'lst2', find the intersection of the two lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return A new list containing the intersection of 'lst1' and 'lst2'.
 *
 * Example:
 * getIntersection(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * getIntersection(listOf("apple", "banana", "orange"), listOf("banana", "grape", "kiwi")) // ["banana"]
 */
fun getIntersection(lst1: List<Any>, lst2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    // Loop through each element in lst1
    for (element in lst1) {
        // Check if the element is in lst2
        if (element in lst2) {
            // Add the element to the intersection list
            intersection.add(element)
        }
    }

    return intersection
}
/**
 * Given two lists 'lst1' and 'lst2', find the intersection of the two lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return A new list containing the intersection of 'lst1' and 'lst2'.
 *
 * Example:
 * getIntersection(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * getIntersection(listOf("apple", "banana", "orange"), listOf("banana", "grape", "kiwi")) // ["banana"]
 */
fun getIntersection(lst1: List<Any>, lst2: List<Any>): List<Any> {
/**
 * Given two lists 'lst1' and 'lst2', find the intersection of the two lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return A new list containing the intersection of 'lst1' and 'lst2'.
 *
 * Example:
 * getIntersection(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * getIntersection(listOf("apple", "banana", "orange"), listOf("banana", "grape", "kiwi")) // ["banana"]
 */
fun getIntersection(lst1: List<Any>, lst2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    // Loop through each element in lst1
    for (element in lst1) {
        // Check if the element is in lst2
        if (element in lst2) {
            // Add the element to the intersection list
            intersection.add(element)
        }
    }

    return intersection
}