/**
 * This function takes two sets, s1 and s2, and removes any elements from s1
 * that are also present in s2. The function returns the modified s1.
 *
 * @param s1 The original set
 * @param s2 The set whose elements should be removed from s1
 * @return The modified set s1
 *
 * Note:
 * - This function uses short-circuiting with if-else to optimize the removal process.
 * - The function should remove elements from s1 in-place without creating a new set.
 */
fun removeElements(s1: MutableSet<Any>, s2: Set<Any>): MutableSet<Any> {

    var i = 0
    while (i < s1.size) {
        val item = s1.elementAt(i)
        
        if (item in s2) {  // If item is present in s2, remove it from s1
            s1.remove(item)
        } else {  // If item is not present in s2, move to the next item
            i++
        }
    }
    
    return s1
}
/**
 * This function takes two sets, s1 and s2, and removes any elements from s1
 * that are also present in s2. The function returns the modified s1.
 *
 * @param s1 The original set
 * @param s2 The set whose elements should be removed from s1
 * @return The modified set s1
 *
 * Note:
 * - This function uses short-circuiting with if-else to optimize the removal process.
 * - The function should remove elements from s1 in-place without creating a new set.
 */
fun removeElements(s1: MutableSet<Any>, s2: Set<Any>): MutableSet<Any> {
/**
 * This function takes two sets, s1 and s2, and removes any elements from s1
 * that are also present in s2. The function returns the modified s1.
 *
 * @param s1 The original set
 * @param s2 The set whose elements should be removed from s1
 * @return The modified set s1
 *
 * Note:
 * - This function uses short-circuiting with if-else to optimize the removal process.
 * - The function should remove elements from s1 in-place without creating a new set.
 */
fun removeElements(s1: MutableSet<Any>, s2: Set<Any>): MutableSet<Any> {

    var i = 0
    while (i < s1.size) {
        val item = s1.elementAt(i)
        
        if (item in s2) {  // If item is present in s2, remove it from s1
            s1.remove(item)
        } else {  // If item is not present in s2, move to the next item
            i++
        }
    }
    
    return s1
}