simple and easy C++ solution 😍❤️‍🔥
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n###### Let\'s Connect on Facebook
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n###### Let\'s Connect on Facebook: www.fb.com/shishirrsiam\n\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    ListNode* modifiedList(vector<int>& nums, ListNode* head) \n    {\n        set<int>st;\n        for(auto num:nums) st.insert(num);\n        \n        ListNode* ans = new ListNode(0);\n        ListNode* tail = ans;\n        while(head)\n        {\n            int val = head->val; head = head->next;\n            if(not st.count(val))\n            {\n                tail->next = new ListNode(val);\n                tail = tail->next;\n            }\n        }\n        return ans->next;\n    }\n};\n```\n\n\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n\n###### Let\'s Connect on LinkedIn: www.linkedin.com/in/shishirrsiam\n###### Let\'s Connect on Facebook: www.fb.com/shishirrsiam\n\n
['Array', 'Hash Table', 'Linked List', 'C++']