/**
 * Given two lists, find the common elements between them.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return A list of common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

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

    // Iterate over each element in list1
    for (element1 in list1) {
        // Check if the element is present in list2 using the 'contains' method
        if (list2.contains(element1)) {
            // Add the common element to the commonElements list
            commonElements.add(element1)
        }
    }

    // Return the list of common elements
    return commonElements
}
/**
 * Given two lists, find the common elements between them.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return A list of common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Given two lists, find the common elements between them.
 *
 * @param list1 The first list
 * @param list2 The second list
 * @return A list of common elements between list1 and list2
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

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

    // Iterate over each element in list1
    for (element1 in list1) {
        // Check if the element is present in list2 using the 'contains' method
        if (list2.contains(element1)) {
            // Add the common element to the commonElements list
            commonElements.add(element1)
        }
    }

    // Return the list of common elements
    return commonElements
}