/**
 * Given two sets, find the common elements and return them in a new set.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return A new set containing the common elements between set1 and set2.
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val commonElements = mutableSetOf<Any>()

    for (element in set1) {
        if (element in set2) {
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * Given two sets, find the common elements and return them in a new set.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return A new set containing the common elements between set1 and set2.
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * Given two sets, find the common elements and return them in a new set.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return A new set containing the common elements between set1 and set2.
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val commonElements = mutableSetOf<Any>()

    for (element in set1) {
        if (element in set2) {
            commonElements.add(element)
        }
    }

    return commonElements
}