/**
 * The function takes in two lists as input and returns a new list containing the common elements in both lists.
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (element in list1) {
        if (element in list2) {
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * The function takes in two lists as input and returns a new list containing the common elements in both lists.
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * The function takes in two lists as input and returns a new list containing the common elements in both lists.
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (element in list1) {
        if (element in list2) {
            commonElements.add(element)
        }
    }

    return commonElements
}