D-ary Heap

D-ary Heap

The d-ary heap or d-heap is a priority queue data structure, a generalization of the binary heap in which the nodes have d children instead of 2. Thus, a binary heap is a 2-heap. According to Tarjan and Jensen et al., d-ary heaps were invented by Donald B. Johnson in 1975.

This data structure allows decrease priority operations to be performed more quickly than binary heaps, at the expense of slower delete minimum operations. This tradeoff leads to better running times for algorithms such as Dijkstra's algorithm in which decrease priority operations are more common than delete min operations. Additionally, d-ary heaps have better memory cache behavior than a binary heap, allowing them to run more quickly in practice despite having a theoretically larger worst-case running time. Like binary heaps, d-ary heaps are an in-place data structure that uses no additional storage beyond that needed to store the array of items in the heap.

Read more about D-ary Heap:  Data Structure, Analysis, Applications

Famous quotes containing the word heap:

    We cannot be any stronger in our foreign policy—for all the bombs and guns we may heap up in our arsenals—than we are in the spirit which rules inside the country. Foreign policy, like a river, cannot rise above its source.
    Adlai Stevenson (1900–1965)