摘要:
Maximum Depth of Binary Tree2014.1.7 23:26Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.Solution: depth(tree) = max(depth(left subtree), depth(right subtree)) + 1; depth(nullptr) = 0; T... 阅读全文
posted @ 2014-01-08 00:05
zhuli19901106
阅读(139)
评论(0)
推荐(0)


浙公网安备 33010602011771号