二叉树

来源:互联网 发布:格里芬体侧数据 编辑:程序博客网 时间:2024/05/19 11:45

A Binary (Max) Heap is a complete binary tree (all levels except possibly the last are fully filled, and the last level is filled from left to right) that maintains the Max Heap property (the parent of each vertex - except the root - is greater than that vertex). Binary Heap is one possible data structure to model efficient Priority Queue. This visualization shows a Binary Max Heap only. However, as this visualization only accept integers, it is easy to convert a Binary Max Heap into a Binary Min Heap by inserting negating every integers in the input.

0 0
原创粉丝点击