/**
 * Given two sets, return a new set that contains the intersection of the two sets
 * where the elements are greater than or equal to a specific value.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set with the elements that are greater than or equal to a specific value.
 *
 * Example:
 * '``
 * val set1 = setOf(1, 2, 3, 4, 5)
 * val set2 = setOf(3, 4, 5, 6, 7)
 * println(intersectGtOrEq(set1, set2)) // Output: [4, 5]
 * '``
 */
fun intersectGtOrEq(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val intersection = mutableSetOf<Int>()

    // Iterate through the first set
    for (element in set1) {
        // Check if the element is present in the second set and is greater than or equal to 4
        if (element in set2 && element >= 4) {
            intersection.add(element)
        }
    }

    return intersection
}
/**
 * Given two sets, return a new set that contains the intersection of the two sets
 * where the elements are greater than or equal to a specific value.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set with the elements that are greater than or equal to a specific value.
 *
 * Example:
 * '``
 * val set1 = setOf(1, 2, 3, 4, 5)
 * val set2 = setOf(3, 4, 5, 6, 7)
 * println(intersectGtOrEq(set1, set2)) // Output: [4, 5]
 * '``
 */
fun intersectGtOrEq(set1: Set<Int>, set2: Set<Int>): Set<Int> {
/**
 * Given two sets, return a new set that contains the intersection of the two sets
 * where the elements are greater than or equal to a specific value.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A new set with the elements that are greater than or equal to a specific value.
 *
 * Example:
 * '``
 * val set1 = setOf(1, 2, 3, 4, 5)
 * val set2 = setOf(3, 4, 5, 6, 7)
 * println(intersectGtOrEq(set1, set2)) // Output: [4, 5]
 * '``
 */
fun intersectGtOrEq(set1: Set<Int>, set2: Set<Int>): Set<Int> {

    val intersection = mutableSetOf<Int>()

    // Iterate through the first set
    for (element in set1) {
        // Check if the element is present in the second set and is greater than or equal to 4
        if (element in set2 && element >= 4) {
            intersection.add(element)
        }
    }

    return intersection
}