/**
 * You are given three inputs:
 * - list1: a list of elements (e.g. integers, strings, etc.)
 * - list2: another list of elements
 * - set1: a set of elements
 *
 * Your task is to modify list1 by removing elements that are present in both list1 and list2,
 * and also removing elements that are present in list1 and set1.
 *
 * Return the modified list1.
 *
 * Example:
 * removeCommonElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7), setOf(6, 7))
 * Output: [1, 2, 3]
 */
fun removeCommonElements(list1: MutableList<Any>, list2: List<Any>, set1: Set<Any>): List<Any> {

    // Loop through list1 and remove elements present in list2
    list1.removeAll { it in list2 }

    // Loop through list1 again and remove elements present in set1
    list1.removeAll { it in set1 }

    return list1
}
/**
 * You are given three inputs:
 * - list1: a list of elements (e.g. integers, strings, etc.)
 * - list2: another list of elements
 * - set1: a set of elements
 *
 * Your task is to modify list1 by removing elements that are present in both list1 and list2,
 * and also removing elements that are present in list1 and set1.
 *
 * Return the modified list1.
 *
 * Example:
 * removeCommonElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7), setOf(6, 7))
 * Output: [1, 2, 3]
 */
fun removeCommonElements(list1: MutableList<Any>, list2: List<Any>, set1: Set<Any>): List<Any> {
/**
 * You are given three inputs:
 * - list1: a list of elements (e.g. integers, strings, etc.)
 * - list2: another list of elements
 * - set1: a set of elements
 *
 * Your task is to modify list1 by removing elements that are present in both list1 and list2,
 * and also removing elements that are present in list1 and set1.
 *
 * Return the modified list1.
 *
 * Example:
 * removeCommonElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7), setOf(6, 7))
 * Output: [1, 2, 3]
 */
fun removeCommonElements(list1: MutableList<Any>, list2: List<Any>, set1: Set<Any>): List<Any> {

    // Loop through list1 and remove elements present in list2
    list1.removeAll { it in list2 }

    // Loop through list1 again and remove elements present in set1
    list1.removeAll { it in set1 }

    return list1
}