📅  最后修改于: 2022-03-11 14:52:46.513000             🧑  作者: Mango
public class Tree {
private Node root;
public Tree(T rootData) {
root = new Node();
root.data = rootData;
root.children = new ArrayList>();
}
public static class Node {
private T data;
private Node parent;
private List> children;
}
}