/**
 * This function finds the common elements between two sets using a for loop and break statement.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A list containing the common elements between the two sets.
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()
    for (elem1 in set1) {
        var found = false
        for (elem2 in set2) {
            if (elem1 == elem2) {
                commonElements.add(elem1)
                found = true
                break
            }
        }
        if (found) {
            continue
        }
    }
    return commonElements
}
/**
 * This function finds the common elements between two sets using a for loop and break statement.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A list containing the common elements between the two sets.
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): List<Any> {
/**
 * This function finds the common elements between two sets using a for loop and break statement.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A list containing the common elements between the two sets.
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): List<Any> {

    val commonElements = mutableListOf<Any>()
    for (elem1 in set1) {
        var found = false
        for (elem2 in set2) {
            if (elem1 == elem2) {
                commonElements.add(elem1)
                found = true
                break
            }
        }
        if (found) {
            continue
        }
    }
    return commonElements
}