用于树结构图片.png
    遍历方法

    1. static void tree(Node b, int depth) {
    2. for(int i=0; i<depth; i++) System.out.print("--");
    3. b.p();
    4. if(b instanceof BranchNode) {
    5. for (Node n : ((BranchNode)b).nodes) {
    6. tree(n, depth + 1);
    7. }
    8. }
    9. }