/**
 * This function takes in two lists and finds the elements that are common between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing elements present in both lists
 */
fun getSharedElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val sharedElements = mutableListOf<Any>()

    // Iterate through each element in the first list
    for (element1 in list1) {
        // Iterate through each element in the second list
        for (element2 in list2) {
            // Check if the current element from list1 is equal to the current element from list2
            if (element1 == element2) {
                // Add the element to the sharedElements list
                sharedElements.add(element1)
            }
        }
    }

    return sharedElements
}
/**
 * This function takes in two lists and finds the elements that are common between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing elements present in both lists
 */
fun getSharedElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * This function takes in two lists and finds the elements that are common between them.
 *
 * @param list1 the first list
 * @param list2 the second list
 * @return a list containing elements present in both lists
 */
fun getSharedElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val sharedElements = mutableListOf<Any>()

    // Iterate through each element in the first list
    for (element1 in list1) {
        // Iterate through each element in the second list
        for (element2 in list2) {
            // Check if the current element from list1 is equal to the current element from list2
            if (element1 == element2) {
                // Add the element to the sharedElements list
                sharedElements.add(element1)
            }
        }
    }

    return sharedElements
}