Tree

What is a complete binary tree?
A complete binary tree is a binary tree in which all the levels except the last level, i.e., leaf node should be completely filled, and all the nodes should be left-justified.

Heap Data Structure
The above figure shows that all the internal nodes are completely filled except the leaf node, but the leaf nodes are added at the right part; therefore, the above tree is not a complete binary tree.

posted @ 2022-07-21 12:55  奋斗中的菲比  阅读(111)  评论(0编辑  收藏  举报