You are given the head of a linked list containing a sequence of integers separated by nodes with a value of Node.val equal to
For every pair of consecutive
Return the head of the modified linked list.
Constraints:
The number of nodes in the list is in the range
Node.val
There are no two consecutive nodes with Node.val
The beginning and end of the linked list have Node.val
You are given the head of a linked list containing a sequence of integers separated by nodes with a value of Node.val equal to
For every pair of consecutive
Return the head of the modified linked list.
Constraints:
The number of nodes in the list is in the range
Node.val
There are no two consecutive nodes with Node.val
The beginning and end of the linked list have Node.val