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:

    Squalor spreads its hideous length
    through the carts and the asses’ feet,
    squalor coils and reopens
    and creeps under barrow
    and heap of refuse....
    Hilda Doolittle (1886–1961)