Problem
You are given an array of integersnums and the head of a linked list. Return the head of the modified linked list after <strong>removing</strong> all nodes from the linked list that have a value that exists in nums.
Examples
Constraints
- 1 <= nums.length <= 10<sup>5</sup>
- 1 <= nums[i] <= 10<sup>5</sup>
- All elements in nums are unique.
- The number of nodes in the given list is in the range [1, 10<sup>5</sup>].
- 1 <= Node.val <= 10<sup>5</sup>
- The input is generated such that there is at least one node in the linked list that has a value not present in nums.