Dec 6, 2018 - Complete Binary Tree If all levels are completely filled except possibly the last level and the last level has all keys as left as possible A classic.
The method 2 of can be easily modified to check whether a tree is Complete or not. To understand the approach, let us first define the term ‘Full Node’. A node is ‘Full Node’ if both left and right children are not empty (or not NULL).The approach is to do a level order traversal starting from the root. In the traversal, once a node is found which is NOT a Full Node, all the following nodes must be leaf nodes.Also, one more thing needs to be checked to handle the below case: If a node has an empty left child, then the right child must be empty.1/ 2 34Thanks to Guddu Sharma for suggesting this simple and efficient approach.