/**
 * Given two sets, this function finds the common elements present in both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A set containing the common elements found in both sets.
 */
fun findCommonElementsInSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val commonElements = mutableSetOf<Any>()

    // Loop through each element in the first set
    for (element in set1) {
        // Check if the element is also present in the second set
        if (element in set2) {
            // If found, add it to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * Given two sets, this function finds the common elements present in both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A set containing the common elements found in both sets.
 */
fun findCommonElementsInSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * Given two sets, this function finds the common elements present in both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A set containing the common elements found in both sets.
 */
fun findCommonElementsInSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val commonElements = mutableSetOf<Any>()

    // Loop through each element in the first set
    for (element in set1) {
        // Check if the element is also present in the second set
        if (element in set2) {
            // If found, add it to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements
}