/**
 * Write a function that removes all occurrences of the given elements from a list.
 *
 * @param lst the list from which elements needs to be removed
 * @param elements a list of elements to be removed from lst
 * @return The modified list after removing all occurrences of the given elements.
 *
 * Note:
 * If an element appears multiple times in both the elements list and the original list, it should be removed completely.
 *
 * Examples:
 * For lst = [1, 2, 3, 4, 5, 6, 7] and elements = [2, 4, 6], the output should be [1, 3, 5, 7].
 * For lst = ['apple', 'banana', 'kiwi', 'banana', 'orange', 'grape'] and elements = ['banana'], the output should be ['apple', 'kiwi', 'orange', 'grape'].
 */
fun removeElements(lst: MutableList<Any>, elements: List<Any>): List<Any> {

    for (element in elements.reversed()) {
        while (element in lst) {
            lst.remove(element)
        }
    }
    return lst
}
/**
 * Write a function that removes all occurrences of the given elements from a list.
 *
 * @param lst the list from which elements needs to be removed
 * @param elements a list of elements to be removed from lst
 * @return The modified list after removing all occurrences of the given elements.
 *
 * Note:
 * If an element appears multiple times in both the elements list and the original list, it should be removed completely.
 *
 * Examples:
 * For lst = [1, 2, 3, 4, 5, 6, 7] and elements = [2, 4, 6], the output should be [1, 3, 5, 7].
 * For lst = ['apple', 'banana', 'kiwi', 'banana', 'orange', 'grape'] and elements = ['banana'], the output should be ['apple', 'kiwi', 'orange', 'grape'].
 */
fun removeElements(lst: MutableList<Any>, elements: List<Any>): List<Any> {
/**
 * Write a function that removes all occurrences of the given elements from a list.
 *
 * @param lst the list from which elements needs to be removed
 * @param elements a list of elements to be removed from lst
 * @return The modified list after removing all occurrences of the given elements.
 *
 * Note:
 * If an element appears multiple times in both the elements list and the original list, it should be removed completely.
 *
 * Examples:
 * For lst = [1, 2, 3, 4, 5, 6, 7] and elements = [2, 4, 6], the output should be [1, 3, 5, 7].
 * For lst = ['apple', 'banana', 'kiwi', 'banana', 'orange', 'grape'] and elements = ['banana'], the output should be ['apple', 'kiwi', 'orange', 'grape'].
 */
fun removeElements(lst: MutableList<Any>, elements: List<Any>): List<Any> {

    for (element in elements.reversed()) {
        while (element in lst) {
            lst.remove(element)
        }
    }
    return lst
}