node.val = node.next.val;
node.next = node.next.next;
Why is not required node.next is null?
I did the same but i only beat 2.7% code. I wondering how could I improve the code.
That's fine, it means just that your code runs as fast as 97.3% submissions, all of which give the optimal result.
Doesn't this fail if there is no node.next.next?
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.