Algorithm/java/三叉链表parent链深拷贝/Node.java
2022-03-03 18:03:39 +08:00

23 lines
400 B
Java

package site.licsber.bitree;
public class Node<T> {
public Node(T data) {
this.data = data;
}
public Node(T data, Node<T> parent) {
this.data = data;
this.parent = parent;
}
public T data;
public Node<T> left;
public Node<T> right;
public Node<T> parent;
@Override
public String toString() {
return data.toString();
}
}