public static void deleteNode(ListNode node) {
if(node == null || node.next == null) {
return;
}
ListNode tn = node.next;
node.val = tn.val;
node.next = tn.next;
}
237. Delete Node in a Linked List
最新推荐文章于 2024-10-13 15:10:00 发布