Questions on trees: 1. What is the difference between the terms level, height and depth?? r all these one and the same? 2. What is the maximum possible number of nodes that could be present in a complete binary tree and full binary tree?
guys sorry if the question was very simple, but need a clear definition for these, do help pls.. expecting your reply..
level is term used when u want specify where are u exactly.i.e,the root node is at level0,the next children of the root node are at 1. if these have children then they are at level2 and so on.... height and depth resemble same:the max level in a tree i.e, if tree has 5 levels then its height is 5. 2)in a binary tree it is \[2^n\] where n is the height of the tree. in full binary tree also it is same.
Join our real-time social learning platform and learn together with your friends!