https://leetcode.com/problems/delete-node-in-a-linked-list/
较简单。注意只修改一个node即可。
public void deleteNode(ListNode node) { if (node == null || node.next == null) { return; } node.val = node.next.val; node.next = node.next.next; }