You are given the head of a singly linked list.
Remove every node that contains a node with a strictly greater value anywhere to its right.
Return the head of the modified linked list.
Constraints:
The number of nodes in the given list is in the range
Node.val
You are given the head of a singly linked list.
Remove every node that contains a node with a strictly greater value anywhere to its right.
Return the head of the modified linked list.
Constraints:
The number of nodes in the given list is in the range
Node.val