Tree - Heap Data Structure

Data System Architecture

About

A heap is a tree data structure constructed from the priority number that needs to satisfy a heap property

The number is called priority because priority queues are often implemented this way

Usage

Heaps are favourite data structures for many applications:

Property

A heap can satisfy one of this two property:

Min Heap

In a min heap:

  • the root store the lowest priority element
  • the priority value of a parent node is less than or equal to the priority value of child

Max heap

In a max heap,

  • the root store the highest priority element
  • the priority value of a parent is greater than or equal to the priority value of child

Example: a binary max heap (By Ermishin - Own work, CC BY-SA 3.0)

Binary Max Heap

Characteristic

Documentation / Reference





Discover More
Sorting Quicksort Anim
Algorithm

An is a (procedure|method) for solving a problem. If there exists an algorithm, the function that performs it is called computable. Study of algorithms dates at least to Euclid and were formalized by...
Data System Architecture
Collection - Priority Queue

A priority queue is a queue where the first element to be retrieved is an element that has the highest priority attribute. An element with high priority is served before an element with low priority....
Data System Architecture
Ordinal Data - Heapsort sorting algorithm

The heap sorting algorithm is a sorting algorithm based on a binary heap (ie binary tree) introduced by J. W. J. Williams in 1964 Heapsort
Binary Max Heap
Ordinal Data - Partially Order

A Partially ordered structure is a data structure where not every pair of elements needs to be comparable (compared). A collection of people ordered by genealogical descendancy: Some pairs of...
Card Puncher Data Processing
What is the Heap Memory?

The heap is a chunk of memory where the variables or functions are stored during run time. A garbage collector manages the heap if present in the language features. The heap has a data structure called...



Share this page:
Follow us:
Task Runner