/**
 * Given two lists, return a list containing the common elements between both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list of common elements between both lists.
 */
fun getCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // Iterate over every element in list1
    for (element in list1) {
        // Check if the element is present in list2
        for (item in list2) {
            if (item == element) {
                commonElements.add(element)
                break
            }
        }
    }

    return commonElements
}
/**
 * Given two lists, return a list containing the common elements between both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list of common elements between both lists.
 */
fun getCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {
/**
 * Given two lists, return a list containing the common elements between both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return A list of common elements between both lists.
 */
fun getCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    // Iterate over every element in list1
    for (element in list1) {
        // Check if the element is present in list2
        for (item in list2) {
            if (item == element) {
                commonElements.add(element)
                break
            }
        }
    }

    return commonElements
}