What exactly is a Complete Binary Tree?
Different sources provide different definitions:
Source 1 :
A complete binary tree of depth d is the strictly binary tree all of whose leaves are at level d.
Source 2 :
In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes at the last level h.An alternative definition is a perfect tree whose rightmost leaves (perhaps all) have been removed.
Wiki says ::
Some authors use the term complete to refer instead to a perfect binary tree as defined above(Source2), in which case they call this type of tree an almost complete binary tree or nearly complete binary tree.
Which definition to follow ?
Visit exam center at your own risk ...