/**
 * This function takes two sets as input and returns a new set containing the common elements between them.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set containing the common elements between set1 and set2.
 */
fun commonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val commonSet = mutableSetOf<Any>()

    // Nested loop to iterate over elements in set1 and set2
    for (element1 in set1) {
        for (element2 in set2) {
            // Checking if the elements are the same
            if (element1 == element2) {
                commonSet.add(element1)
            }
        }
    }

    return commonSet
}
/**
 * This function takes two sets as input and returns a new set containing the common elements between them.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set containing the common elements between set1 and set2.
 */
fun commonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * This function takes two sets as input and returns a new set containing the common elements between them.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set containing the common elements between set1 and set2.
 */
fun commonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val commonSet = mutableSetOf<Any>()

    // Nested loop to iterate over elements in set1 and set2
    for (element1 in set1) {
        for (element2 in set2) {
            // Checking if the elements are the same
            if (element1 == element2) {
                commonSet.add(element1)
            }
        }
    }

    return commonSet
}