The structures we just described are similar to a traditional implementation of priority queues known as the heap . Heaps are a particular form of binary tree designed to provide quick access to the highest-priority element in the tree. Tree Terminology Heaps are a kind of tree. The root is the top or beginning of the tree. A node is a part of the tree.
Most nodes have one or more children .
Each node other than the root has a parent . Nodes without children are called leaves . Nodes with children are called interior nodes . The level of a node is the number of steps from root to that node. The root is at level 0.