/**
 * Given two sets, removes the common elements from both sets and returns the updated sets.
 *
 * @param sequence1 First set of elements
 * @param sequence2 Second set of elements
 * @return Pair of updated sequence1 and sequence2
 *
 * Example:
 * removeCommonElements(setOf(1, 2, 3, 4), setOf(3, 4, 5, 6)) // returns Pair(setOf(1, 2), setOf(5, 6))
 * removeCommonElements(setOf("apple", "banana", "cherry"), setOf("banana", "cherry", "durian")) // returns Pair(setOf("apple"), setOf("durian"))
 */
fun removeCommonElements(sequence1: Set<Any>, sequence2: Set<Any>): Pair<Set<Any>, Set<Any>> {

    val commonElements = sequence1.intersect(sequence2)
    val updatedSequence1 = sequence1 - commonElements
    val updatedSequence2 = sequence2 - commonElements

    return Pair(updatedSequence1, updatedSequence2)
}
/**
 * Given two sets, removes the common elements from both sets and returns the updated sets.
 *
 * @param sequence1 First set of elements
 * @param sequence2 Second set of elements
 * @return Pair of updated sequence1 and sequence2
 *
 * Example:
 * removeCommonElements(setOf(1, 2, 3, 4), setOf(3, 4, 5, 6)) // returns Pair(setOf(1, 2), setOf(5, 6))
 * removeCommonElements(setOf("apple", "banana", "cherry"), setOf("banana", "cherry", "durian")) // returns Pair(setOf("apple"), setOf("durian"))
 */
fun removeCommonElements(sequence1: Set<Any>, sequence2: Set<Any>): Pair<Set<Any>, Set<Any>> {
/**
 * Given two sets, removes the common elements from both sets and returns the updated sets.
 *
 * @param sequence1 First set of elements
 * @param sequence2 Second set of elements
 * @return Pair of updated sequence1 and sequence2
 *
 * Example:
 * removeCommonElements(setOf(1, 2, 3, 4), setOf(3, 4, 5, 6)) // returns Pair(setOf(1, 2), setOf(5, 6))
 * removeCommonElements(setOf("apple", "banana", "cherry"), setOf("banana", "cherry", "durian")) // returns Pair(setOf("apple"), setOf("durian"))
 */
fun removeCommonElements(sequence1: Set<Any>, sequence2: Set<Any>): Pair<Set<Any>, Set<Any>> {

    val commonElements = sequence1.intersect(sequence2)
    val updatedSequence1 = sequence1 - commonElements
    val updatedSequence2 = sequence2 - commonElements

    return Pair(updatedSequence1, updatedSequence2)
}