/**
 * This exercise requires adding elements from one set to another set using enumeration.
 * The goal is to add all elements from set2 to set1 using a for loop and the enumerate function.
 * The result will be a set containing all elements from both sets, without any duplicate values.
 */
fun addElementsToSet(set1: MutableSet<Int>, set2: Set<Int>): MutableSet<Int> {

    // Iterate over the elements in set2
    for (element in set2) {
        // Add the element to set1 only if it doesn't already exist
        if (element !in set1) {
            set1.add(element)
        }
    }
    return set1
}

// Demo
/**
 * This exercise requires adding elements from one set to another set using enumeration.
 * The goal is to add all elements from set2 to set1 using a for loop and the enumerate function.
 * The result will be a set containing all elements from both sets, without any duplicate values.
 */
fun addElementsToSet(set1: MutableSet<Int>, set2: Set<Int>): MutableSet<Int> {
/**
 * This exercise requires adding elements from one set to another set using enumeration.
 * The goal is to add all elements from set2 to set1 using a for loop and the enumerate function.
 * The result will be a set containing all elements from both sets, without any duplicate values.
 */
fun addElementsToSet(set1: MutableSet<Int>, set2: Set<Int>): MutableSet<Int> {

    // Iterate over the elements in set2
    for (element in set2) {
        // Add the element to set1 only if it doesn't already exist
        if (element !in set1) {
            set1.add(element)
        }
    }
    return set1
}

// Demo