/**
 * This function takes two sets as input and returns a new set that contains only the common elements
 * between the two sets.
 *
 * @param set1 First input set.
 * @param set2 Second input set.
 * @return A set containing the common elements between set1 and set2.
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): Set<Int> {

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

    // Iterate through each element in set1
    for (element in set1) {
        // Check if the element is present in set2
        if (element in set2) {
            // Add the common element to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * This function takes two sets as input and returns a new set that contains only the common elements
 * between the two sets.
 *
 * @param set1 First input set.
 * @param set2 Second input set.
 * @return A set containing the common elements between set1 and set2.
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * This function takes two sets as input and returns a new set that contains only the common elements
 * between the two sets.
 *
 * @param set1 First input set.
 * @param set2 Second input set.
 * @return A set containing the common elements between set1 and set2.
 */
fun findCommonElements(set1: Set<Int>, set2: Set<Int>): Set<Int> {

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

    // Iterate through each element in set1
    for (element in set1) {
        // Check if the element is present in set2
        if (element in set2) {
            // Add the common element to the commonElements set
            commonElements.add(element)
        }
    }

    return commonElements
}