力扣:面试题 02.03. 删除中间节点

This commit is contained in:
huangge1199 2021-02-05 15:18:25 +08:00
parent 4a7bc5544d
commit 1364be8654

View File

@ -0,0 +1,10 @@
package com.code.leet.study.t20210205;
import com.code.leet.entiy.ListNode;
public class DeleteNode {
public void deleteNode(ListNode node) {
node.val = node.next.val;
node.next = node.next.next;
}
}