/**
 * Given two lists, remove the elements from list2 that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The modified list2 after removing the common elements.
 *
 * Example:
 * removeElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7)) -> [6, 7]
 */
fun removeElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val result = mutableListOf<Int>()
    for (element in list2) {
        if (element !in list1) {
            result.add(element)
        }
    }
    return result
}
/**
 * Given two lists, remove the elements from list2 that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The modified list2 after removing the common elements.
 *
 * Example:
 * removeElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7)) -> [6, 7]
 */
fun removeElements(list1: List<Int>, list2: List<Int>): List<Int> {
/**
 * Given two lists, remove the elements from list2 that are common to both lists.
 *
 * @param list1 The first list.
 * @param list2 The second list.
 * @return The modified list2 after removing the common elements.
 *
 * Example:
 * removeElements(listOf(1, 2, 3, 4, 5), listOf(4, 5, 6, 7)) -> [6, 7]
 */
fun removeElements(list1: List<Int>, list2: List<Int>): List<Int> {

    val result = mutableListOf<Int>()
    for (element in list2) {
        if (element !in list1) {
            result.add(element)
        }
    }
    return result
}