/**
 * Given two lists, return a list containing the common elements between them.
 *
 * Example:
 * list1 = [1, 2, 3, 4, 5]
 * list2 = [3, 5, 7, 9]
 *
 * The function should return [3, 5].
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (element1 in list1) {
        for (element2 in list2) {
            if (element1 == element2) {
                commonElements.add(element1)
            }
        }
    }

    return commonElements
}
/**
 * Given two lists, return a list containing the common elements between them.
 *
 * Example:
 * list1 = [1, 2, 3, 4, 5]
 * list2 = [3, 5, 7, 9]
 *
 * The function should return [3, 5].
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * Given two lists, return a list containing the common elements between them.
 *
 * Example:
 * list1 = [1, 2, 3, 4, 5]
 * list2 = [3, 5, 7, 9]
 *
 * The function should return [3, 5].
 */
fun findCommonElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (element1 in list1) {
        for (element2 in list2) {
            if (element1 == element2) {
                commonElements.add(element1)
            }
        }
    }

    return commonElements
}