Is a tree complete? | PROGRAMMING INTERVIEWS
uestion: WAP to find if a tree is complete or not?
Definition: A complete tree is a tree in which:
1) Every level, except possibly the last, is completely filled.
2) At last level, all nodes are as far left as possible.
i.e A complete tree is a tree which has a HEAP like structure.
Read full article from Is a tree complete? | PROGRAMMING INTERVIEWS
No comments:
Post a Comment