Beats 95% people|| Very Beginner Friendly
Approach\n Describe your approach to solving the problem. \nFor Easy accessing of data firstly convert the nums array into a hashset. Then start traversing the 
# Approach\n<!-- Describe your approach to solving the problem. -->\nFor Easy accessing of data firstly convert the nums array into a hashset. Then start traversing the linkedlist from starting by maintaining current pointer and previous pointer. \n1. If you encounter a node whose value is present in the hashset then assign previous->next to cuurent node next value. If incase your previous is NULL it means you have to remove your head node so place you head to cuurent->next.\n2. Else the Node value is not in hashset so, assign cuurent to previous.\n3.  Now regardless of above operations move your current pointer to next node.\n4. After successfull traversal return the head.\n**I Think if you explain this approach to interviewer he will be satisfied with your approach.**\n# Complexity\n- Time complexity: $$O(n)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:$$O(n)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\n/**\n * Definition for singly-linked list.\n * struct ListNode {\n *     int val;\n *     ListNode *next;\n *     ListNode() : val(0), next(nullptr) {}\n *     ListNode(int x) : val(x), next(nullptr) {}\n *     ListNode(int x, ListNode *next) : val(x), next(next) {}\n * };\n */\nclass Solution {\npublic:\n    ListNode* modifiedList(vector<int>& nums, ListNode* head) {\n        unordered_set<int>s;\n        for(auto it:nums)\n        s.insert(it);\n        ListNode*t=head,*prev=NULL;\n        while(t!=NULL)\n        {\n            if(s.find(t->val)!=s.end())\n            {\n                if(prev==NULL)\n                head=t->next;\n                else\n                prev->next=t->next;\n            }\n            else\n            {\n                prev=t;\n            }\n            t=t->next;\n        }\n        return head;\n    }\n};\n```
['Array', 'Hash Table', 'Linked List', 'C++']