/**
 * A mathematician is trying to find the common elements between two given lists.
 * They are given two lists, lst1 and lst2, each containing integer values.
 * The mathematician needs to write a function that returns a new list containing the common elements found in both lists.
 * The order of the elements in the resulting list does not matter.
 *
 * Complete the function below to solve the exercise.
 */
fun findCommonElements(lst1: List<Int>, lst2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    // iterate over each element in lst1
    for (element in lst1) {
        // check if the current element is present in lst2
        if (lst2.contains(element)) {
            // add the element to the commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * A mathematician is trying to find the common elements between two given lists.
 * They are given two lists, lst1 and lst2, each containing integer values.
 * The mathematician needs to write a function that returns a new list containing the common elements found in both lists.
 * The order of the elements in the resulting list does not matter.
 *
 * Complete the function below to solve the exercise.
 */
fun findCommonElements(lst1: List<Int>, lst2: List<Int>): List<Int> {
/**
 * A mathematician is trying to find the common elements between two given lists.
 * They are given two lists, lst1 and lst2, each containing integer values.
 * The mathematician needs to write a function that returns a new list containing the common elements found in both lists.
 * The order of the elements in the resulting list does not matter.
 *
 * Complete the function below to solve the exercise.
 */
fun findCommonElements(lst1: List<Int>, lst2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    // iterate over each element in lst1
    for (element in lst1) {
        // check if the current element is present in lst2
        if (lst2.contains(element)) {
            // add the element to the commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}