/**
 * This function takes two sets as input and finds the intersection of the two sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return The intersection of set1 and set2.
 *
 * Example:
 * intersectionOfSets(setOf(1, 2, 3), setOf(2, 3, 4)) // returns setOf(2, 3)
 */
fun intersectionOfSets(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val intersection = mutableSetOf<Int>()

    for (item in set1) {
        if (item in set2) {
            intersection.add(item)
        }
    }

    return intersection
}
/**
 * This function takes two sets as input and finds the intersection of the two sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return The intersection of set1 and set2.
 *
 * Example:
 * intersectionOfSets(setOf(1, 2, 3), setOf(2, 3, 4)) // returns setOf(2, 3)
 */
fun intersectionOfSets(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * This function takes two sets as input and finds the intersection of the two sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return The intersection of set1 and set2.
 *
 * Example:
 * intersectionOfSets(setOf(1, 2, 3), setOf(2, 3, 4)) // returns setOf(2, 3)
 */
fun intersectionOfSets(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val intersection = mutableSetOf<Int>()

    for (item in set1) {
        if (item in set2) {
            intersection.add(item)
        }
    }

    return intersection
}