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

    val commonElements = mutableSetOf<Any>()  // Initialize an empty set to store the common elements

    // Loop through the elements of set1
    for (element in set1) {
        if (element in set2) {  // Check if the element is also present in set2
            commonElements.add(element)  // Add the common element to the new set
        }
    }

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

    val commonElements = mutableSetOf<Any>()  // Initialize an empty set to store the common elements

    // Loop through the elements of set1
    for (element in set1) {
        if (element in set2) {  // Check if the element is also present in set2
            commonElements.add(element)  // Add the common element to the new set
        }
    }

    return commonElements
}