O(nlog(n))
A study-log Blog for Computer Science,algorithms and puzzles. Discussions are most welcome :-)
Labels
algorithm
(14)
backtracking
(2)
c
(2)
compiler
(2)
dbms
(3)
dp
(2)
puzzles
(8)
questions
(2)
recursion
(1)
sorting
(2)
tree
(1)
Wednesday, August 10, 2011
Depth of a binary tree
Calculate the depth of a given binary tree using recursion. concept : start from node and recurse both left and right branches taking the maximum of the two and keep a depth variable to store the current depth
No comments:
Post a Comment
Newer Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment