/**
 * Given two lists, return a new list containing the intersection of elements from both lists.
 *
 * @param lst1 The first input list.
 * @param lst2 The second input list.
 * @return A new list containing the common elements.
 *
 * Examples:
 * getCommonElements(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 * getCommonElements(listOf("a", "b", "c"), listOf("b", "d")) // ["b"]
 */
fun getCommonElements(lst1: List<Any>, lst2: List<Any>): List<Any> {

    return lst1.filter { x -> lst2.any { y -> x == y } }
}
/**
 * Given two lists, return a new list containing the intersection of elements from both lists.
 *
 * @param lst1 The first input list.
 * @param lst2 The second input list.
 * @return A new list containing the common elements.
 *
 * Examples:
 * getCommonElements(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 * getCommonElements(listOf("a", "b", "c"), listOf("b", "d")) // ["b"]
 */
fun getCommonElements(lst1: List<Any>, lst2: List<Any>): List<Any> {
/**
 * Given two lists, return a new list containing the intersection of elements from both lists.
 *
 * @param lst1 The first input list.
 * @param lst2 The second input list.
 * @return A new list containing the common elements.
 *
 * Examples:
 * getCommonElements(listOf(1, 2, 3, 4), listOf(3, 4, 5, 6)) // [3, 4]
 * getCommonElements(listOf("a", "b", "c"), listOf("b", "d")) // ["b"]
 */
fun getCommonElements(lst1: List<Any>, lst2: List<Any>): List<Any> {

    return lst1.filter { x -> lst2.any { y -> x == y } }
}