Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.4k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Algorithms
2k+ articles
Amazon
1.8k+ articles
Sorting
1.7k+ articles
Data Structures
1.1k+ articles
Queue
360+ articles
priority-queue
130+ articles
DSA
>
Data Structures
>
Heap
Heap
260+ posts
Popular Articles
Recent Articles
Heap Data Structure
Last Updated: 26 April 2025
A Heap is a complete binary tree data structure that satisfies the heap property: for every node, the value of its children is greater than
...read more
Heap
DSA
Introduction to Data Structures
Last Updated: 13 April 2025
What is Data Structure?A data structure is a particular way of organising data in a computer so that it can be used effectively. The idea is
...read more
Arrays
Linked List
Tree
Graph
Stack
Queue
Heap
Data Structures
DSA
Building Heap from Array
Last Updated: 21 March 2025
Given an array of n elements. The task is to build a Max Heap from the given array. Examples:Input: arr[] = {4, 10, 3, 5, 1}Output: Correspo
...read more
Arrays
Heap
DSA
Similar Topics
DSA
22.4k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Algorithms
2k+ articles
Amazon
1.8k+ articles
Sorting
1.7k+ articles
Data Structures
1.1k+ articles
Queue
360+ articles
priority-queue
130+ articles
Insertion and Deletion in Heaps
Last Updated: 10 October 2023
Deletion in Heap:Given a Binary Heap and an element present in the given Heap. The task is to delete an element from this Heap.The standard
...read more
Misc
Heap
Data Structures
DSA
Max Heap in Java
Last Updated: 08 February 2023
A max-heap is a complete binary tree in which the value in each internal node is greater than or equal to the values in the children of that
...read more
Java
Heap
priority-queue
java-priority-queue
Picked
Java-Queue-Programs
DSA
Priority Queue in Python
Last Updated: 26 April 2025
A priority queue is like a regular queue, but each item has a priority. Instead of being served in the order they arrive, items with higher
...read more
Queue
Heap
Python
priority-queue
Python-DSA
DSA
K’th Smallest Element in Unsorted Array
Last Updated: 14 August 2024
Given an array arr[] of N distinct elements and a number K, where K is smaller than the size of the array. Find the K'th smallest element in
...read more
Arrays
Order-Statistics
Microsoft
Amazon
Cisco
VMWare
Snapdeal
Accolite
SAP Labs
Rockstand
Searching
Heap
ABCO
DSA
Job Sequencing Problem
Last Updated: 28 March 2025
Given two arrays: deadline[] and profit[], where the index of deadline[] represents a job ID, and deadline[i] denotes the deadline for that
...read more
Accolite
Greedy
Sorting
Heap
DSA
Binary Heap
Last Updated: 24 March 2025
A Binary Heap is a complete binary tree that stores data efficiently, allowing quick access to the maximum or minimum element, depending on
...read more
Heap
DSA
Merge k Sorted Arrays
Last Updated: 23 August 2024
Given K sorted arrays, merge them and print the sorted output.Examples:Input:K = 3, arr = { {1, 3, 5, 7},{2, 4, 6, 8},{0, 9, 10, 11}}Output:
...read more
Arrays
Microsoft
Amazon
Flipkart
VMWare
Citrix
Sorting
Heap
Merge Sort
DSA
Heap Sort - Data Structures and Algorithms Tutorials
Last Updated: 02 January 2025
Heap sort is a comparison-based sorting technique based on Binary Heap Data Structure. It can be seen as an optimization over selection so
...read more
Amazon
Oracle
Samsung
Belzabar
Intuit
SAP Labs
Visa
24*7 Innovation Labs
Sorting
Heap
Heap Sort
DSA
Huffman Coding | Greedy Algo-3
Last Updated: 22 April 2025
Huffman coding is a lossless data compression algorithm. The idea is to assign variable-length codes to input characters, lengths of the ass
...read more
Amazon
Huffman Coding
Morgan Stanley
Samsung
United Health Group
Greedy
Heap
encoding-decoding
priority-queue
DSA
Time Complexity of building a heap
Last Updated: 17 November 2024
Consider the following algorithm for building a Heap of an input array A.A quick look over the above implementation suggests that the runnin
...read more
Analysis of Algorithms
Heap
DSA
Sliding Window Maximum (Maximum of all subarrays of size K)
Last Updated: 25 February 2025
Given an arrayarr[]of integers and an integerk, your task is to find the maximum value for each contiguous subarray of sizek. The output sho
...read more
Arrays
Amazon
Flipkart
Directi
Zoho
SAP Labs
Queue
Heap
sliding-window
DSA
Find k largest elements in an array
Last Updated: 06 February 2025
Given an array arr[] and an integer k, the task is to find k largest elements in the given array. Elements in the output array should be in
...read more
Arrays
Order-Statistics
Microsoft
Amazon
Samsung
Walmart
Searching
Sorting
Heap
DSA
1
2
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !