Types of Heap
There are two types of the heap: Min Heap and Max heap. Min Heap: The value of the parent node should be less than or equal to either of its children. In other words, the min-heap can be defined as, for every node i, the value of node i is greater than or equal to its parent value except the root node. Max Heap: The value of the parent node is greater than or equal to its children. In other words, the max heap can be defined as for every node i; the value of node i is less than or equal to its parent value except the root node.
Binary Heap
A binary heap is a complete binary tree that satisfies the heap ordering property. The ordering can be one of two types: The min-heap property: The value of each node is greater than or equal to the value of its parent, with the minimum-value element at the root. The max-heap property: The value of each node is less than or equal to the value of its parent, with the maximum-value element at the root. It is a useful data structure if you need to remove the object with the highest (or lowest) priority. A common use of a heap is to implement a priority queue. Binary Heap
By Aman kumar Chourasiya
● Published At Jan 2022
This blog discusses the concept and implementation of the binary heap data structure. We will also see the applications of binary heaps in some well known algorithms and library implementations.... Keep reading .. Tournament Trees and Binary Heaps
By Akshat Chaturvedi
● Published At Oct 2021
In this blog post, we’ll see what Tournament Trees (Selection Trees) are and why we use these in data structures. ... Keep reading .. Implementation of Heap
By Ishita Chawla
● Published At Oct 2021
In this blog, we will be discussing the implementation of heap and more specifically, binary heap implementation.... Keep reading ..
Binomial Heap
The Binomial Heap is a special kind of Binary Heap that has fast union and merge operations. Binomial Heap is essentially a set of Binomial Trees. The number of nodes in a Binomial Tree of order k is 2^k. Binomial Heap
By Nishant Rana
● Published At Oct 2021
This blog will cover the theory and implementation part of Binomial Heap(Upgraded version of Binary-Heap). ... Keep reading ..
Fibonacci Heap
Fibonacci Heap has the best runtime complexity for all priority queue-related operations. We group the minimum heap trees to form a Fibonacci Heap. Fibonacci Heap improves the asymptotic runtime of Dijkstra's algorithm to compute the shortest path between two graph nodes. Fibonacci Heap
By Shubham Agarwal
● Published At Apr 2022
The blog covers information about the Fibonacci heap. The blog also covers information about types of Heap.... Keep reading ..
Leftist Heap
A leftist heap is implemented using a priority queue. In a leftist heap, every node contains distance to the nearest leaf node. This property is called minimum null-path length which is used to perform insertion, deletion, and merge operations in a leftist heap to be O(log n). Leftist Heap
By Jaglike Makkar
● Published At Feb 2022
In this article, we will discuss what is a leftist heap. We will also see the C++ implementation and time complexity of its various operations.... Keep reading ..
K-Array Heap
In a binary heap, a node can have at most 2 children. A k-ary heap is a generalization of the binary heap. The ‘K’ in a K-ary heap represents the maximum number of children possible for each node of a K-ary heap. N-ary Heap
By Gaurish Anand
● Published At Feb 2022 