You're viewing a comment by Rahul and its responses.

Rahul Permalink
July 14, 2010, 10:19

well. if tree is complete binary tree, no of nodes in tree can be found using formula n = 2 pow h, where h is the height to tree.if u take log on both sides it comes out to log(n) = h log(2).
log(n) = h log(2) of log base 2
h = log(n).

but this is valid in case of complete binary tree.
i hope this solve your query.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "apple_84": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.