/**
 * This exercise requires you to find the intersection of values between two sets using nested loops.
 * The function takes in two sets as arguments and returns the common elements found in both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A set containing the common elements found in both sets.
 */
fun intersectionOfNestedLoopsAndOperationsOnSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersectionSet = mutableSetOf<Any>()
    for (element1 in set1) {
        for (element2 in set2) {
            if (element1 == element2) {
                intersectionSet.add(element1)
            }
        }
    }
    return intersectionSet
}
/**
 * This exercise requires you to find the intersection of values between two sets using nested loops.
 * The function takes in two sets as arguments and returns the common elements found in both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A set containing the common elements found in both sets.
 */
fun intersectionOfNestedLoopsAndOperationsOnSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {
/**
 * This exercise requires you to find the intersection of values between two sets using nested loops.
 * The function takes in two sets as arguments and returns the common elements found in both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return A set containing the common elements found in both sets.
 */
fun intersectionOfNestedLoopsAndOperationsOnSets(set1: Set<Any>, set2: Set<Any>): Set<Any> {

    val intersectionSet = mutableSetOf<Any>()
    for (element1 in set1) {
        for (element2 in set2) {
            if (element1 == element2) {
                intersectionSet.add(element1)
            }
        }
    }
    return intersectionSet
}