面试39---二叉树的深度
摘要:题目链接 求解二叉树的深度,延伸可见leetcode110题。 法一:dfs。 1 private int TreeDepth(TreeNode root) { 2 if(root == null) { 3 return 0; 4 } 5 int l = TreeDepth(root.left);
阅读全文
posted @ 2018-05-09 11:47
posted @ 2018-05-09 11:47
posted @ 2018-04-02 10:29
posted @ 2018-03-16 10:10