/**
 * Given a list of numbers and a set of elements to remove, remove the
 * elements from the list and return the modified list.
 *
 * @param nums The list of numbers.
 * @param removeSet The set of elements to remove.
 * @return The modified list after removing the elements.
 */
fun removeElements(nums: List<Int>, removeSet: Set<Int>): List<Int> {

    // Initialize an empty list to store the modified list
    val modifiedList = mutableListOf<Int>()
    
    // Iterate through each element in the list
    for (num in nums) {
        // Check if the element is present in the removeSet
        if (num !in removeSet) {
            // Append the element to the modified list
            modifiedList.add(num)
        }
    }
    
    return modifiedList
}
/**
 * Given a list of numbers and a set of elements to remove, remove the
 * elements from the list and return the modified list.
 *
 * @param nums The list of numbers.
 * @param removeSet The set of elements to remove.
 * @return The modified list after removing the elements.
 */
fun removeElements(nums: List<Int>, removeSet: Set<Int>): List<Int> {
/**
 * Given a list of numbers and a set of elements to remove, remove the
 * elements from the list and return the modified list.
 *
 * @param nums The list of numbers.
 * @param removeSet The set of elements to remove.
 * @return The modified list after removing the elements.
 */
fun removeElements(nums: List<Int>, removeSet: Set<Int>): List<Int> {

    // Initialize an empty list to store the modified list
    val modifiedList = mutableListOf<Int>()
    
    // Iterate through each element in the list
    for (num in nums) {
        // Check if the element is present in the removeSet
        if (num !in removeSet) {
            // Append the element to the modified list
            modifiedList.add(num)
        }
    }
    
    return modifiedList
}