/**
 * Remove elements greater than or equal to the given threshold from a set.
 *
 * @param numbers A set of numbers.
 * @param threshold Threshold value for removing elements.
 * @return The updated set after removing elements.
 * @throws IllegalArgumentException If the input set is empty.
 *
 * Example:
 * removeGreaterThanEqualTo(setOf(1, 2, 3, 4, 5), 4) -> setOf(1, 2, 3)
 * removeGreaterThanEqualTo(setOf(10, 20, 30, 40, 50), 30) -> setOf(10, 20)
 * removeGreaterThanEqualTo(emptySet(), 5) -> IllegalArgumentException: Input set cannot be empty.
 */
fun removeGreaterThanEqualTo(numbers: Set<Int>, threshold: Int): Set<Int> {

    // Check if the set is empty
    if (numbers.isEmpty()) {
        throw IllegalArgumentException("Input set cannot be empty.")
    }

    // Remove elements greater than or equal to threshold
    return numbers.filter { it < threshold }.toSet()
}
/**
 * Remove elements greater than or equal to the given threshold from a set.
 *
 * @param numbers A set of numbers.
 * @param threshold Threshold value for removing elements.
 * @return The updated set after removing elements.
 * @throws IllegalArgumentException If the input set is empty.
 *
 * Example:
 * removeGreaterThanEqualTo(setOf(1, 2, 3, 4, 5), 4) -> setOf(1, 2, 3)
 * removeGreaterThanEqualTo(setOf(10, 20, 30, 40, 50), 30) -> setOf(10, 20)
 * removeGreaterThanEqualTo(emptySet(), 5) -> IllegalArgumentException: Input set cannot be empty.
 */
fun removeGreaterThanEqualTo(numbers: Set<Int>, threshold: Int): Set<Int> {
/**
 * Remove elements greater than or equal to the given threshold from a set.
 *
 * @param numbers A set of numbers.
 * @param threshold Threshold value for removing elements.
 * @return The updated set after removing elements.
 * @throws IllegalArgumentException If the input set is empty.
 *
 * Example:
 * removeGreaterThanEqualTo(setOf(1, 2, 3, 4, 5), 4) -> setOf(1, 2, 3)
 * removeGreaterThanEqualTo(setOf(10, 20, 30, 40, 50), 30) -> setOf(10, 20)
 * removeGreaterThanEqualTo(emptySet(), 5) -> IllegalArgumentException: Input set cannot be empty.
 */
fun removeGreaterThanEqualTo(numbers: Set<Int>, threshold: Int): Set<Int> {

    // Check if the set is empty
    if (numbers.isEmpty()) {
        throw IllegalArgumentException("Input set cannot be empty.")
    }

    // Remove elements greater than or equal to threshold
    return numbers.filter { it < threshold }.toSet()
}