Easy Python Program For Beginners||Beats 100%||O(n) Approach
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```python []\n# Definition for singly-linked list.\n# class ListNode(object):\n#     def __init__(self, val=0, next=None):\n#         self.val = val\n#         self.next = next\nclass Solution(object):\n    def modifiedList(self, nums, head):\n        b=set(nums)\n        c=[]\n        temp=head\n        while(temp!=None):\n            if(temp.val not in b):\n                c.append(temp.val)\n            temp=temp.next\n        new=None\n        i=0\n        while(i<len(c)):\n            t=ListNode(c[i])\n            if(new==None):\n                new=t\n                newhead=new\n            else:\n                newhead.next=t\n                newhead=t\n            i+=1\n        return new\n```
['Python']