/**
 * This function takes in two sets and returns the intersection of the two sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return A new set containing the common elements present in both set1 and set2.
 */
fun intersection(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val result = mutableSetOf<Int>()

    for (elem in set1) {
        if (elem in set2) {
            result.add(elem)
        }
    }

    return result
}
/**
 * This function takes in two sets and returns the intersection of the two sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return A new set containing the common elements present in both set1 and set2.
 */
fun intersection(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * This function takes in two sets and returns the intersection of the two sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return A new set containing the common elements present in both set1 and set2.
 */
fun intersection(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val result = mutableSetOf<Int>()

    for (elem in set1) {
        if (elem in set2) {
            result.add(elem)
        }
    }

    return result
}