/**
 * This exercise requires the creation of a function that takes two sets as input parameters and returns a list of
 * common numbers present in both sets. The function should loop through the first set using a for loop and check
 * if each number is present in the second set using a branching statement. The function should ignore any repetitions
 * and only include unique common numbers in the returned list.
 *
 * @param set1 First input set containing numbers
 * @param set2 Second input set containing numbers
 * @return List of unique common numbers found in both sets
 */
fun findCommonNumbers(set1: Set<Int>, set2: Set<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()

    for (num in set1) {
        if (num in set2 && num !in commonNumbers) {
            commonNumbers.add(num)
        }
    }

    return commonNumbers
}
/**
 * This exercise requires the creation of a function that takes two sets as input parameters and returns a list of
 * common numbers present in both sets. The function should loop through the first set using a for loop and check
 * if each number is present in the second set using a branching statement. The function should ignore any repetitions
 * and only include unique common numbers in the returned list.
 *
 * @param set1 First input set containing numbers
 * @param set2 Second input set containing numbers
 * @return List of unique common numbers found in both sets
 */
fun findCommonNumbers(set1: Set<Int>, set2: Set<Int>): List<Int> {
/**
 * This exercise requires the creation of a function that takes two sets as input parameters and returns a list of
 * common numbers present in both sets. The function should loop through the first set using a for loop and check
 * if each number is present in the second set using a branching statement. The function should ignore any repetitions
 * and only include unique common numbers in the returned list.
 *
 * @param set1 First input set containing numbers
 * @param set2 Second input set containing numbers
 * @return List of unique common numbers found in both sets
 */
fun findCommonNumbers(set1: Set<Int>, set2: Set<Int>): List<Int> {

    val commonNumbers = mutableListOf<Int>()

    for (num in set1) {
        if (num in set2 && num !in commonNumbers) {
            commonNumbers.add(num)
        }
    }

    return commonNumbers
}