/**
 * Given two lists, returns a list of elements that are present in both lists.
 *
 * @param list1 First list.
 * @param list2 Second list.
 * @return A list of elements that are present in both list1 and list2.
 */
fun intersectionFinder(list1: List<Any>, list2: List<Any>): List<Any> {

    // Initialize an empty list to store the intersection
    val intersection = mutableListOf<Any>()

    // Iterate over each element in list1
    for (elem1 in list1) {
        // Check if the element is also present in list2
        if (elem1 in list2) {
            // Add the element to the intersection list
            intersection.add(elem1)
        }
    }

    // Return the final intersection list
    return intersection
}
/**
 * Given two lists, returns a list of elements that are present in both lists.
 *
 * @param list1 First list.
 * @param list2 Second list.
 * @return A list of elements that are present in both list1 and list2.
 */
fun intersectionFinder(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Given two lists, returns a list of elements that are present in both lists.
 *
 * @param list1 First list.
 * @param list2 Second list.
 * @return A list of elements that are present in both list1 and list2.
 */
fun intersectionFinder(list1: List<Any>, list2: List<Any>): List<Any> {

    // Initialize an empty list to store the intersection
    val intersection = mutableListOf<Any>()

    // Iterate over each element in list1
    for (elem1 in list1) {
        // Check if the element is also present in list2
        if (elem1 in list2) {
            // Add the element to the intersection list
            intersection.add(elem1)
        }
    }

    // Return the final intersection list
    return intersection
}