/**
 * This function takes two sets as input and deletes the elements that are common to both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return The resulting set after deleting the intersecting elements.
 */
fun deleteIntersectingElements(set1: MutableSet<Int>, set2: MutableSet<Int>): MutableSet<Int> {

    // Get the intersection of the two sets
    val intersection = set1.intersect(set2)

    // Delete the intersecting elements
    intersection.forEach {
        set1.remove(it)
        set2.remove(it)
    }

    return set1
}

// Exercise:
// A game developer is working on a game that involves managing different game objects in sets. However, there is a bug in the code where the intersecting elements between two sets are not being properly deleted. Your task is to complete the function 'deleteIntersectingElements' which takes two sets as input and returns a set with the intersecting elements deleted.

// Example:
val set1 = mutableSetOf(1, 2, 3, 4, 5)
val set2 = mutableSetOf(4, 5, 6, 7, 8)
val result = deleteIntersectingElements(set1, set2)
/**
 * This function takes two sets as input and deletes the elements that are common to both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return The resulting set after deleting the intersecting elements.
 */
fun deleteIntersectingElements(set1: MutableSet<Int>, set2: MutableSet<Int>): MutableSet<Int> {
/**
 * This function takes two sets as input and deletes the elements that are common to both sets.
 *
 * @param set1 The first set.
 * @param set2 The second set.
 * @return The resulting set after deleting the intersecting elements.
 */
fun deleteIntersectingElements(set1: MutableSet<Int>, set2: MutableSet<Int>): MutableSet<Int> {

    // Get the intersection of the two sets
    val intersection = set1.intersect(set2)

    // Delete the intersecting elements
    intersection.forEach {
        set1.remove(it)
        set2.remove(it)
    }

    return set1
}

// Exercise:
// A game developer is working on a game that involves managing different game objects in sets. However, there is a bug in the code where the intersecting elements between two sets are not being properly deleted. Your task is to complete the function 'deleteIntersectingElements' which takes two sets as input and returns a set with the intersecting elements deleted.

// Example:
val set1 = mutableSetOf(1, 2, 3, 4, 5)
val set2 = mutableSetOf(4, 5, 6, 7, 8)
val result = deleteIntersectingElements(set1, set2)