二叉树遍历

二叉树

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class TreeNode{
public String val;
public TreeNode left;
public TreeNode right;

public TreeNode(String val) {
this.val = val;
}

public TreeNode(String val, TreeNode left, TreeNode right) {
this.val = val;
this.left = left;
this.right = right;
}
}
阅读更多