/**
 * This exercise requires you to iterate through two sets and concatenate their unique elements.
 *
 * @param set1 The first set to be iterated through.
 * @param set2 The second set to be iterated through.
 * @return A list containing the unique elements from both sets, concatenated together.
 *
 * Instructions:
 * 1. Iterate through set1 and set2 simultaneously using a loop.
 * 2. Create an empty list to store the unique elements.
 * 3. Check if each element is already in the list. If not, add it to the list.
 * 4. Concatenate the unique elements from both sets together.
 * 5. Return the concatenated list.
 */
fun concatenateUniqueElements(set1: Set<String>, set2: Set<String>): String {

    val uniqueElements = mutableListOf<String>()

    for ((element1, element2) in set1.zip(set2)) {
        if (element1 !in uniqueElements) {
            uniqueElements.add(element1)
        }

        if (element2 !in uniqueElements) {
            uniqueElements.add(element2)
        }
    }

    return uniqueElements.joinToString("")
}
/**
 * This exercise requires you to iterate through two sets and concatenate their unique elements.
 *
 * @param set1 The first set to be iterated through.
 * @param set2 The second set to be iterated through.
 * @return A list containing the unique elements from both sets, concatenated together.
 *
 * Instructions:
 * 1. Iterate through set1 and set2 simultaneously using a loop.
 * 2. Create an empty list to store the unique elements.
 * 3. Check if each element is already in the list. If not, add it to the list.
 * 4. Concatenate the unique elements from both sets together.
 * 5. Return the concatenated list.
 */
fun concatenateUniqueElements(set1: Set<String>, set2: Set<String>): String {
/**
 * This exercise requires you to iterate through two sets and concatenate their unique elements.
 *
 * @param set1 The first set to be iterated through.
 * @param set2 The second set to be iterated through.
 * @return A list containing the unique elements from both sets, concatenated together.
 *
 * Instructions:
 * 1. Iterate through set1 and set2 simultaneously using a loop.
 * 2. Create an empty list to store the unique elements.
 * 3. Check if each element is already in the list. If not, add it to the list.
 * 4. Concatenate the unique elements from both sets together.
 * 5. Return the concatenated list.
 */
fun concatenateUniqueElements(set1: Set<String>, set2: Set<String>): String {

    val uniqueElements = mutableListOf<String>()

    for ((element1, element2) in set1.zip(set2)) {
        if (element1 !in uniqueElements) {
            uniqueElements.add(element1)
        }

        if (element2 !in uniqueElements) {
            uniqueElements.add(element2)
        }
    }

    return uniqueElements.joinToString("")
}