×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

heap

A collection of 15 posts

C++

Heap in C++ using OOP and Template

In this article at OpenGenus, we will explore how to implement the heap data structure in C++ using principles of object-oriented programming (OOP) and templates.

Arravelly Keerthi
Algorithms

Minimum Deletions to Make Array Divisible [3 Solutions]

In this article, we will explore how we can get the minimum number of deletion of smallest element such that the smallest element in the first array divides all the elements in the second array. This will involve the concept of Min Heap and Hash Map.

Aswin Shailajan
Algorithms

Find K closest numbers to a given value

In this article, we will explore on how to find the K closest numbers to a given value in a given set of numbers. We have presented two approaches using the concepts of binary search and Heap data structure.

Aswin Shailajan
Algorithms

Merge K Sorted Array

In this article, we have explored 3 approaches to merge K sorted arrays such that the resulting array is sorted as well. This involve the concept of Min / Max Heap.

Bhavani Sankar Nagarapu Bhavani Sankar Nagarapu
Data Structures

Kinetic Heap

In this article, we will explore the topic of Kinetic Heap Data Structures, including its implementation and practical applications.

Abhijeet Saroha Abhijeet Saroha
Algorithms

Create a Heap from Array of N integers

In this post, we discuss the heap data structure and how to create a min and max heap from N given integers in form of an Array. Similarly, inserting elements one by one take O(N logN) time but the optimal approach takes O(N) time.

Erick Lumunge
Algorithms

k-th Largest Element in a stream

In this article, we will discuss the problem Kth largest Element in a stream, and understand the different methods that can be used to solve the problem efficiently.

Adith Narein T Adith Narein T
Algorithms

Median in stream of running integers [Explained 3 Algorithms]

Given that integers are being read from a data stream, we need to find the median of all the elements read so far starting from the first integer till the last integer. This is called the Median in Running stream of Integers.

Shreya Shah Shreya Shah
Data Structures

Soft heap

Soft heap is a variant of heap data structure (priority queue). It is a powerful data structure owing to amortized constant time complexity of some basic functions.

Tushti
Data Structures

Skew Heap

We have explained Skew heap. Skew heap is a special variant of Leftist heap. Leftist heap is in turn, a variant of binary heap. We have given an overview of binary heaps, then discussed leftist heaps and finally talked about skew heaps.

Tushti
Data Structures

Fibonacci Heap

A Fibonacci heap is a heap data structure similar to the binomial heap. It uses Fibonacci numbers and also used to implement the priority queue element in Dijkstra’s shortest path algorithm which reduces the time complexity from O(m log n) to O(m + n log n)

Rohit Kumar Rohit Kumar
Data Structures

Max Heap and Min Heap

A min heap is a heap where every single parent node, including the root, is less than or equal to the value of its children nodes. The most important property of a min heap is that the node with the smallest, or minimum value, will always be the root node. Max heap is similar

Rupali Kavale Rupali Kavale
Data Structures

Pairing Heap

Pairing heaps are a type of heap data structures which have fast running time for their operations. They are modificaton of Binomial Heap. Basically it is a type of self adjusting Binomial Heap which adjusts or rearrange themselves during the operations, due to which they remain balanced.

Nisarg Shah Nisarg Shah
Data Structures

Leftist Heap

A leftist heap is a modification priority queue implemneted with variant of binary heap. Regarding binary heap, it is always a complete binary tree. It has two main properites Mean Heap Property and Heavy on left side and supports common operations in O(log N) time complexity.

Nisarg Shah Nisarg Shah
Data Structures

Binomial Heap

Binomial Heap is an extension of Binary Heap that provides faster union or merge operation together with other operations provided by Binary Heap. A Binomial Heap is a collection of Binomial trees. Binomial Heap is used to implement priority queues.

Sadanand Vishwas Sadanand Vishwas
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship