Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
JavaScript
9.9K+ articles
Arrays
4.2K+ articles
Greedy
1.4K+ articles
Arrays
257+ articles
Heap
177+ articles
priority-queue
148+ articles
Greedy Algorithms
111+ articles
java-priority-queue
41+ articles
max-heap
8 posts
Recent Articles
Popular Articles
Count elements that are greater than at least K elements on its left and right
Last Updated: 23 July 2025
Given an array arr[] of size n (1 = n = 10^5) and a positive integer k, the task is to count all indices i ( 1= i n) in the array such that at least k elements to the lef...
read more
Geeks Premier League
DSA
Arrays
max-heap
Geeks Premier League 2023
Furthest Reachable Tower using Blocks and Ladders
Last Updated: 23 July 2025
Given an array heights[] of size N, where heights[i] is the height of the ith tower. We are standing at the 0th tower with B blocks and L ladders and we have to reach the ...
read more
Greedy
DSA
Greedy Algorithms
priority-queue
max-heap
Reduce Array by replacing pair with their difference
Last Updated: 20 December 2023
You are given an array of positive integers. You can perform the following operations on the array any number of times:Select the two largest elements in the array, suppos...
read more
Heap
DSA
priority-queue
java-priority-queue
max-heap
Heap data structure implementation in swift
Last Updated: 28 April 2025
A heap is a complete binary tree where each node satisfies the heap property. The heap property is different for different types of heaps but, in general, it means that ea...
read more
Heap
Picked
DSA
min-heap
max-heap
Find the minimised number using given operations
Last Updated: 23 July 2025
Given an array arr[] of n elements. In one operation you can pick two indices i and j, such that arr[i] ≥ arr[j] and replace the value of arr[i] with (arr[i] - arr[j]), th...
read more
Heap
DSA
Arrays
max-heap
Introduction to Max-Heap – Data Structure and Algorithm Tutorials
Last Updated: 23 July 2025
A Max-Heap is a Data Structure with the following properties:It is a Complete Binary Tree.The value of the root node must be the largest among all its descendant nodes, an...
read more
DSA
Tutorials
max-heap
Max Heap in JavaScript
Last Updated: 23 July 2025
A max-heap is a complete binary tree in which the value in each node is greater than the values in the descendant nodes. Mapping the elements of a heap into an array is tr...
read more
JavaScript
max-heap
Merge Two Binary Max Heaps
Last Updated: 23 July 2025
Given two binary max heaps, the task is to merge the given heaps to form a new max heap.Examples : Input: a[] = {10, 5, 6, 2}, b[] = {12, 7, 9}Output: {12, 10, 9, 2, 5, 7,...
read more
Heap
DSA
Arrays
Arrays
max-heap
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 !