Delete Node in a Linked List

You are given access to a node in a singly linked list, but not to the head of the list. The node is guaranteed not to be the tail. Delete that node from the list in place and return nothing.

The list contains unique values. The trusted harness constructs the list and passes only the target node to solve. It observes the original head after the call.

Examples
Input: {"nodes":[{"val":0,"next":1},{"val":10,"next":null}],"roots":{"head":0,"node":0}}
Output: [10]
Hints

Delete Node in a Linked List

You are given access to a node in a singly linked list, but not to the head of the list. The node is guaranteed not to be the tail. Delete that node from the list in place and return nothing.