simple java solution || beats 90%
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```java []\nclass Solution {\n    public ListNode modifiedList(int[] nums, ListNode head) {\n        Set<Integer> set = new HashSet<>();\n        for (int i : nums) {\n            set.add(i);\n        }\n        while(head.next!=null && set.contains(head.val)){\n            head=head.next;\n        }\n        ListNode current=head;\n        while(current.next!=null){\n            if(set.contains(current.next.val)){\n                current.next=current.next.next;\n            }\n            else{\n                current=current.next;\n            }\n        }\n        return head;\n    }\n}\n```
['Hash Table', 'Linked List', 'Java']