/**
 * This function takes two sets as input and returns their intersection using an alternative to ternary operator.
 */
fun intersectionOperationSet(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersection = mutableSetOf<Any>()

    // Iterate through each element in set1
    for (element in set1) {
        // Add element to intersection if it is also present in set2
        if (element in set2) {
            intersection.add(element)
        } else if (set1.isEmpty() || set2.isEmpty()) {
            intersection.clear()
            break
        }
    }

    return intersection
}
/**
 * This function takes two sets as input and returns their intersection using an alternative to ternary operator.
 */
fun intersectionOperationSet(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * This function takes two sets as input and returns their intersection using an alternative to ternary operator.
 */
fun intersectionOperationSet(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersection = mutableSetOf<Any>()

    // Iterate through each element in set1
    for (element in set1) {
        // Add element to intersection if it is also present in set2
        if (element in set2) {
            intersection.add(element)
        } else if (set1.isEmpty() || set2.isEmpty()) {
            intersection.clear()
            break
        }
    }

    return intersection
}