Node
变更
This commit is contained in:
parent
0ebca8aca4
commit
8b2979d1a4
@ -4,10 +4,18 @@ public class Node {
|
|||||||
public int val;
|
public int val;
|
||||||
public Node next;
|
public Node next;
|
||||||
public Node random;
|
public Node random;
|
||||||
|
public Node prev;
|
||||||
|
public Node child;
|
||||||
|
|
||||||
public Node(int val) {
|
public Node(int val) {
|
||||||
this.val = val;
|
this.val = val;
|
||||||
this.next = null;
|
this.next = null;
|
||||||
this.random = null;
|
this.random = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Node(int val, Node prev, Node head, Node next) {
|
||||||
|
head.val = val;
|
||||||
|
head.prev = prev;
|
||||||
|
head.next = next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user