/**
 * This function takes two lists as input and returns the intersection (common elements) of the two lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return A list containing the common elements of lst1 and lst2.
 *
 * Example:
 * intersectionWithIndexing(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * intersectionWithIndexing(listOf("a", "b", "c"), listOf("c", "d", "e")) // ["c"]
 * intersectionWithIndexing(listOf(10, 20, 30), listOf(40, 50, 60)) // []
 */
fun intersectionWithIndexing(lst1: List<Any>, lst2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    for (element1 in lst1) {
        for (element2 in lst2) {
            if (element1 == element2) {
                intersection.add(element1)
            }
        }
    }

    return intersection
}
/**
 * This function takes two lists as input and returns the intersection (common elements) of the two lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return A list containing the common elements of lst1 and lst2.
 *
 * Example:
 * intersectionWithIndexing(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * intersectionWithIndexing(listOf("a", "b", "c"), listOf("c", "d", "e")) // ["c"]
 * intersectionWithIndexing(listOf(10, 20, 30), listOf(40, 50, 60)) // []
 */
fun intersectionWithIndexing(lst1: List<Any>, lst2: List<Any>): List<Any> {
/**
 * This function takes two lists as input and returns the intersection (common elements) of the two lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return A list containing the common elements of lst1 and lst2.
 *
 * Example:
 * intersectionWithIndexing(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7, 8)) // [4, 5]
 * intersectionWithIndexing(listOf("a", "b", "c"), listOf("c", "d", "e")) // ["c"]
 * intersectionWithIndexing(listOf(10, 20, 30), listOf(40, 50, 60)) // []
 */
fun intersectionWithIndexing(lst1: List<Any>, lst2: List<Any>): List<Any> {

    val intersection = mutableListOf<Any>()

    for (element1 in lst1) {
        for (element2 in lst2) {
            if (element1 == element2) {
                intersection.add(element1)
            }
        }
    }

    return intersection
}