/**
 * This function finds the common elements between two sets
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {

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

    // Iterate over each element in the first set
    for (element1 in set1) {
        // Set a flag to track if the current element is common in both sets
        var isCommon = false

        // Iterate over each element in the second set
        for (element2 in set2) {
            // Check if the current element in set1 is common with any element in set2
            if (element1 == element2) {
                isCommon = true  // Set the flag as true to indicate common element
                break  // Exit the loop as common element is found
            }
        }

        // Add the current element to the commonElements set if it is common
        if (isCommon) {
            commonElements.add(element1)
        }
    }

    return commonElements
}
/**
 * This function finds the common elements between two sets
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * This function finds the common elements between two sets
 */
fun findCommonElements(set1: Set<Any>, set2: Set<Any>): Set<Any> {

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

    // Iterate over each element in the first set
    for (element1 in set1) {
        // Set a flag to track if the current element is common in both sets
        var isCommon = false

        // Iterate over each element in the second set
        for (element2 in set2) {
            // Check if the current element in set1 is common with any element in set2
            if (element1 == element2) {
                isCommon = true  // Set the flag as true to indicate common element
                break  // Exit the loop as common element is found
            }
        }

        // Add the current element to the commonElements set if it is common
        if (isCommon) {
            commonElements.add(element1)
        }
    }

    return commonElements
}