力扣:面试题 02.03. 删除中间节点
This commit is contained in:
parent
4a7bc5544d
commit
1364be8654
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user