/**
 * Given two lists 'list1' and 'list2', remove all elements from 'list1' that are present in 'list2'.
 * Use nested loops to compare each element of 'list1' with each element of 'list2'.
 */
fun removeElements(list1: MutableList<Int>, list2: List<Int>): MutableList<Int> {

    // Iterate through each element in 'list1'
    val iterator = list1.iterator()
    while (iterator.hasNext()) {
        val element = iterator.next()
        
        // Iterate through each element in 'list2'
        for (compareElement in list2) {
            
            // Check if the current 'element' is equal to 'compareElement'
            if (element == compareElement) {
                
                // Remove the element from 'list1' and break the inner loop
                iterator.remove()
                break
            }
        }
    }
    
    return list1
}
/**
 * Given two lists 'list1' and 'list2', remove all elements from 'list1' that are present in 'list2'.
 * Use nested loops to compare each element of 'list1' with each element of 'list2'.
 */
fun removeElements(list1: MutableList<Int>, list2: List<Int>): MutableList<Int> {
/**
 * Given two lists 'list1' and 'list2', remove all elements from 'list1' that are present in 'list2'.
 * Use nested loops to compare each element of 'list1' with each element of 'list2'.
 */
fun removeElements(list1: MutableList<Int>, list2: List<Int>): MutableList<Int> {

    // Iterate through each element in 'list1'
    val iterator = list1.iterator()
    while (iterator.hasNext()) {
        val element = iterator.next()
        
        // Iterate through each element in 'list2'
        for (compareElement in list2) {
            
            // Check if the current 'element' is equal to 'compareElement'
            if (element == compareElement) {
                
                // Remove the element from 'list1' and break the inner loop
                iterator.remove()
                break
            }
        }
    }
    
    return list1
}