C++ easy soultion
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: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(int i=0;i<nums.size();i++){\n            s.insert(nums[i]);\n        }\n        ListNode* prev=new ListNode(0);;\n        prev->next =head;\n        ListNode* curr= prev; \n        while(curr->next!=NULL) {\n            if (s.find(curr->next->val)!=s.end()) {\n                curr->next = curr->next->next;  } \n                else{\n                curr = curr->next;} }   \n        return prev->next;\n    }\n};\n```
['Linked List', 'C++']