/**
 * Given two sets, setA and setB, find the intersection of the elements in setA that are less than the smallest
 * element in setB. Return a new set containing the intersecting elements.
 *
 * @param setA A set of elements
 * @param setB Another set of elements
 * @return A new set containing the intersection of elements
 *
 * Example:
 * val setA = setOf(1, 2, 3, 4, 5)
 * val setB = setOf(4, 5, 6, 7)
 * intersectionLessThan(setA, setB)
 * Output: setOf(1, 2, 3)
 */
fun intersectionLessThan(setA: Set<Int>, setB: Set<Int>): Set<Int> {

    val smallestB = setB.minOrNull() ?: return emptySet()
    val intersection = mutableSetOf<Int>()

    for (element in setA) {
        if (element < smallestB) {
            intersection.add(element)
        }
    }

    return intersection
}
/**
 * Given two sets, setA and setB, find the intersection of the elements in setA that are less than the smallest
 * element in setB. Return a new set containing the intersecting elements.
 *
 * @param setA A set of elements
 * @param setB Another set of elements
 * @return A new set containing the intersection of elements
 *
 * Example:
 * val setA = setOf(1, 2, 3, 4, 5)
 * val setB = setOf(4, 5, 6, 7)
 * intersectionLessThan(setA, setB)
 * Output: setOf(1, 2, 3)
 */
fun intersectionLessThan(setA: Set<Int>, setB: Set<Int>): Set<Int> {
/**
 * Given two sets, setA and setB, find the intersection of the elements in setA that are less than the smallest
 * element in setB. Return a new set containing the intersecting elements.
 *
 * @param setA A set of elements
 * @param setB Another set of elements
 * @return A new set containing the intersection of elements
 *
 * Example:
 * val setA = setOf(1, 2, 3, 4, 5)
 * val setB = setOf(4, 5, 6, 7)
 * intersectionLessThan(setA, setB)
 * Output: setOf(1, 2, 3)
 */
fun intersectionLessThan(setA: Set<Int>, setB: Set<Int>): Set<Int> {

    val smallestB = setB.minOrNull() ?: return emptySet()
    val intersection = mutableSetOf<Int>()

    for (element in setA) {
        if (element < smallestB) {
            intersection.add(element)
        }
    }

    return intersection
}