/**
 * This function finds the common elements between two sets and returns them in a list.
 *
 * @param set1 The first set
 * @param set2 The second set
 * @return A list of common elements between the two sets
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (elem in set1) {
        if (elem >= set2.minOrNull() ?: 0 && elem <= set2.maxOrNull() ?: 0) {
            commonElements.add(elem)
        }
    }

    return commonElements
}
/**
 * This function finds the common elements between two sets and returns them in a list.
 *
 * @param set1 The first set
 * @param set2 The second set
 * @return A list of common elements between the two sets
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): List<Int> {
/**
 * This function finds the common elements between two sets and returns them in a list.
 *
 * @param set1 The first set
 * @param set2 The second set
 * @return A list of common elements between the two sets
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): List<Int> {

    val commonElements = mutableListOf<Int>()

    for (elem in set1) {
        if (elem >= set2.minOrNull() ?: 0 && elem <= set2.maxOrNull() ?: 0) {
            commonElements.add(elem)
        }
    }

    return commonElements
}