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

    val commonElements = mutableListOf<Any>()

    var i = 0
    while (i < list1.size) {
        if (list1[i] in list2) {
            commonElements.add(list1[i])
        }
        i++
    }

    return commonElements
}
/**
 * Given two lists, find the common elements between them.
 *
 * @param list1 First list.
 * @param list2 Second list.
 * @return A list containing the 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 First list.
 * @param list2 Second list.
 * @return A list containing the common elements between list1 and list2.
 */
fun findCommonElements(list1: List<Any>, list2: List<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()

    var i = 0
    while (i < list1.size) {
        if (list1[i] in list2) {
            commonElements.add(list1[i])
        }
        i++
    }

    return commonElements
}