Heap

Definition & Meaning

Last updated 23 month ago

What is Heap?

A heap, within the Context of inFormation structure, is a tree-based facts shape that satisfies the heap property, where every element is assigned a key value, or Weighting. The lower price key always has a figure Node with a higher-cost key. This is referred to as a max-heap structure, and among all nodes, the Root Node has the very best key.

Sometimes, a tree-based shape has a reversed structure rule, in which an detail with a higher cost key usually has a lower value key as a figure node. This is called a min-heap structure, and among all nodes, the Root node has the bottom key.

What Does Heap Mean?

There are no practical restrictions at the wide Variety of kids every node can have in a heap, even though each node generally has two, at the most. The heap is taken into consideration the maximum efficient Implementation of an summary information kind, known as the priority Queue. Heap implementation is crucial in numerous graph Algorithms (consisting of Dijkstra’s algorithm) as well as in the heapsort Sorting Algorithm.

Heaps have numerous variances that act as abstract information kind Precedence queue implementations with high efficiency. Many Packages, consisting of graph algorithms, require the implementation of priority queues.

An Array is the most common implementation shape of heap, where no tips are had to Hyperlink among its factors.

Heaps carry out more than one operations, which includes:

  • Find-max: Searches for the highest key node amongst a Collection of nodes
  • Find-min: Searches for the bottom key node amongst a collection of nodes
  • Delete-max: Deletes the very best key node among a set of nodes
  • Delete-min: Deletes the bottom key node amongst a set of nodes

Heaps also encompass capabilities that carry out merging, Insertion and key cHanges.

Share Heap article on social networks

Your Score to Heap article

Score: 5 out of 5 (1 voters)

Be the first to comment on the Heap

4679- V6

tech-term.com© 2023 All rights reserved