You are given an array of integers nums and the head of a singly linked list.
Remove all nodes from the linked list whose value appears in nums.
Return the head of the modified linked list.
Constraints:
nums.length
nums[i]
All elements in nums are unique.
The number of nodes in the given list is in the range
Node.val
The input is generated such that there is at least nums.
You are given an array of integers nums and the head of a singly linked list.
Remove all nodes from the linked list whose value appears in nums.
Return the head of the modified linked list.
Constraints:
nums.length
nums[i]
All elements in nums are unique.
The number of nodes in the given list is in the range
Node.val
The input is generated such that there is at least nums.