Skip to content
Tutorials
Python Tutorial
Taking Input in Python
Python Operators
Python Data Types
Python Numbers
Python String
Python Lists
Python Tuples
Sets in Python
Python Dictionary
Python Loops and Control Flow
Python Conditional Statements
Python Loops
Python Functions
Python OOPS Concept
Python Data Structures
Python DSA
Linked List
Stack
Queue
Tree
Heap
Hashing
Graph
Sets
Map
Advance Data Structure
Sorting Algorithms
Searching Algorithms
Python Exception Handling
Python File Handling
Python Exercises
Python List Exercise
Python String Exercise
Python Tuple Exercise
Python Dictionary Exercise
Python Set Exercise
Python Design Patterns
Python Programming Examples
Python Practice Questions
Java
Java Programming Language
Java Tutorial
Data Types
Variables
Operators
Flow Control in Java
Loops in Java
Methods
Strings
Arrays
OOPs Concepts
OOPs Concepts
Classes and Objects
Access Modifiers
Inheritance
Abstraction
Encapsulation
Polymorphism
Interface
Packages
Multithreading
File Handling
Regular Expression
Java Collections
Java Collections
Collection Class
List Interface
ArrayList
LinkedList Class
Queue Interface
Set Interface
HashSet Class
Map Interface
HashMap Class
HashTable Class
Iterator
Comparator
Collection Interview Questions
Java 8 Tutorial
Java Programs
Java Programming Examples
Java Array Programs
Java String Programs
Java Date-Time Programs
Java File Handling Programs
Java Collection Programs
Java JDBC Programs
Java Apache POI Programs
Java OpenCV Programs
Java Interview Questions
Java Interview Questions
Core Java Interview Questions-Freshers
Java Multithreading Interview Questions
OOPs Interview Questions and Answers
Java Exercises
Java Quiz
Java Quiz
Core Java MCQ
Java Projects
Advance Java
Spring Tutorial
Spring Boot Tutorial
Spring Boot Interview Questions
Spring MVC Tutorial
Spring MVC Interview Questions
Hibernate Tutorial
Hibernate Interview Questions
Programming Languages
C
C++
JavaScript
PHP
R Tutorial
C#
SQL
Scala
Perl
Go Language
Kotlin
System Design
System Design Tutorial
What is System Design
Key Terminologies in System Design
Analysis and Architecture of Systems
Scalability in System Design
Databases in System Design
High Level Design or HLD
Low Level Design or LLD
Case Studies in Designing Systems
Complete System Design Tutorial
Software Design Patterns
System Design Roadmap
Top 10 System Design Interview Questions and Answers
Interview Corner
Company Preparation
Top Topics
Practice Company Questions
Interview Experiences
Experienced Interviews
Internship Interviews
Competitive Programming
Multiple Choice Quizzes
Aptitude for Placements
Computer Science Subjects
Operating System
DBMS
Computer Networks
Engineering Mathematics
Computer Organization and Architecture
Theory of Computation
Compiler Design
Digital Logic
Software Engineering
DevOps
GIT
AWS
Docker
Kubernetes
Microsoft Azure Tutorial
Google Cloud Platform
Linux
Linux Tutorial
Linux Commands A-Z
Linux Commands Cheatsheet
File Permission Commands
Linux System Administration
Linux File System
Linux Shell Scripting
Linux Networking
Linux Interview Questions
Software Testing
Software Testing Tutorial
Software Engineering Tutorial
Testing Interview Questions
Jira
Databases
DBMS Tutorial
SQL Tutorial
PostgreSQL Tutorial
MongoDB Tutorial
SQL Interview Questions
MySQL Interview Questions
PL/SQL Interview Questions
Android
Android Tutorial
Android Studio Tutorial
Kotlin For Android
Android Projects
Android Interview Questions
6 Weeks of Android App Development
Excel
MS Excel Tutorial
Introduction to MS Excel
Data Analysis in Excel
Basic Excel Formulas & Functions
Data Analysis in Advanced Excel
Workbooks
Statistical Functions
Data Visualization in Excel
Pivot Tables in Excel
Excel Spreadsheets in Python
Basic Excel Shortcuts
Mathematics
Number System
Algebra
Linear Algebra
Trigonometry
Set Theory
Statistics
Probability
Geometry
Mensuration
Logarithms
Calculus
Commerce
Business Studies
Accountancy
Microeconomics
Statistics for Economics
Macroeconomics
Human Resource Management (HRM)
Management
Finance
Commerce Complete Guide
Aptitude
Aptitude Question and Answers
Quantitative Aptitude
Logical Reasoning
Verbal Ability
DSA
Data Structures
Arrays
Matrix
Strings
Linked List
Singly Linked List
Doubly Linked List
Circular Linked List
Doubly Circular Linked List
Linked List Tutorial
Stack
Queue
Tree
Generic Tree
Binary Tree
Binary Search Tree
AVL Tree
B Tree
B+ Tree
Red Black Tree
Tree Data Structure Tutorial
Heap
Hashing
Graph
Set Data Structure
Map Data Structure
Advanced Data Structure
Data Structures Tutorial
Algorithms
Analysis of Algorithms
Design and Analysis of Algorithms
Asymptotic Analysis
Asymptotic Notations
Worst, Average and Best Cases
Searching Algorithms
Linear Search
Binary Search
Searching Algorithms Tutorial
Sorting Algorithms
Selection Sort
Bubble Sort
Insertion Sort
Merge Sort
Quick Sort
Heap Sort
Counting Sort
Radix Sort
Bucket Sort
Sorting Algorithms Tutorial
Greedy Algorithms
Dynamic Programming
Graph Algorithms
Pattern Searching
Recursion
Backtracking
Divide and Conquer
Mathematical Algorithms
Geometric Algorithms
Bitwise Algorithms
Randomized Algorithms
Branch and Bound
Algorithms Tutorial
DSA Tutorial
Practice
All DSA Problems
Problem of the Day
Company Wise Coding Practice
Amazon
Microsoft
Flipkart
Explore All
GfG SDE Sheet
Practice Problems Difficulty Wise
School
Basic
Easy
Medium
Hard
Language Wise Coding Practice
CPP
Java
Python
Curated DSA Lists
Beginner's DSA Sheet
Top 50 Array Problems
Top 50 String Problems
Top 50 DP Problems
Top 50 Graph Problems
Top 50 Tree Problems
Competitive Programming
Company Wise SDE Sheets
Facebook SDE Sheet
Amazon SDE Sheet
Apple SDE Sheet
Netflix SDE Sheet
Google SDE Sheet
DSA Cheat Sheets
SDE Sheet
DSA Sheet for Beginners
FAANG Coding Sheet
Product-Based Coding Sheet
Company-Wise Preparation Sheet
Top Interview Questions
Top 100 DSA Interview Questions Topic-wise
Puzzles
All Puzzles
Top 100 Puzzles Asked In Interviews
Top 20 Puzzles Commonly Asked During SDE Interviews
Data Science
Python Tutorial
R Tutorial
Machine Learning
Data Science using Python
Data Science using R
Data Science Packages
Pandas Tutorial
NumPy Tutorial
Data Visualization
Python Data Visualization Tutorial
Data Visualization with R
Data Analysis
Data Analysis with Python
Data Analysis with R
Deep Learning
NLP Tutorial
Web Tech
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
PHP Tutorial
ReactJS Tutorial
NodeJS Tutorial
AngularJS Tutorial
Bootstrap Tutorial
Typescript
Web Development Using Python
Django
Django Tutorial
Django Projects
Django Interview Questions
Flask
Flask Tutorial
Flask Projects
Flask Interview Questions
Postman
Github
Wordpress Tutorial
Web Design
Cheat Sheets
HTML Cheat Sheet
CSS Cheat Sheet
JavaScript Cheat Sheet
React Cheat Sheet
Angular Cheat Sheet
jQuery Cheat Sheet
Bootstrap Cheat Sheet
JavaScript Projects
Learn Complete Web Development
Courses
Coding for Everyone
DSA to Development
Machine Learning & Data Science
Generative AI & ChatGPT
Become AWS Certified
DSA Courses
Data Structure & Algorithm(C++/JAVA)
Data Structure & Algorithm(Python)
Data Structure & Algorithm(JavaScript)
Programming Languages
CPP
Java
Python
JavaScript
C
Trending Now
DSA
Web Tech
Foundational Courses
Data Science
Practice Problem
Python
Machine Learning
JavaScript
System Design
Django
DevOps Tutorial
Java
C
C++
ReactJS
NodeJS
CP Live
Aptitude
Puzzles
Projects
▲
Similar Topics
DSA
22.1k+ 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
350+ articles
priority-queue
130+ articles
DSA
>
Data Structures
>
Heap
Heap
260+ posts
Popular Articles
Recent Articles
Introduction to Data Structures
Last Updated: 16 April 2024
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: 14 July 2023
Given an array of N elements. The task is to build a Binary Heap from the given array. The heap can be either Max Heap or Min Heap.Examples:
...read more
Arrays
Misc
Heap
DSA
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
Similar Topics
DSA
22.1k+ 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
350+ articles
priority-queue
130+ articles
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: 29 August 2022
Priority Queues are abstract data structures where each data/value in the queue has a certain priority. For example, In airlines, baggage wi
...read more
Misc
Queue
Heap
Python
priority-queue
Python-DSA
DSA
K’th Smallest/Largest Element in Unsorted Array
Last Updated: 31 May 2024
Given an array arr[] of size N and a number K, where K is smaller than the size of the array. Find the K'th smallest element in the given ar
...read more
Arrays
Order-Statistics
Microsoft
Amazon
Cisco
VMWare
Snapdeal
Accolite
SAP Labs
Rockstand
Searching
Heap
ABCO
DSA
Binary Heap
Last Updated: 06 February 2024
A Binary Heap is a complete Binary Tree which is used to store data efficiently to get the max or min element based on its structure.A Binar
...read more
Heap
DSA
Merge k sorted arrays | Set 1
Last Updated: 16 February 2023
Given K sorted arrays of size N each, merge them and print the sorted output.Examples:Input:K = 3, N = 4, arr = { {1, 3, 5, 7},{2, 4, 6, 8},
...read more
Arrays
Microsoft
Amazon
Flipkart
VMWare
Citrix
Sorting
Heap
Merge Sort
DSA
Heap Sort - Data Structures and Algorithms Tutorials
Last Updated: 29 March 2024
Heap sort is a comparison-based sorting technique based on Binary Heap data structure. It is similar to the selection sort where we first fi
...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: 11 September 2023
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
Sort a nearly sorted (or K sorted) array
Last Updated: 12 April 2023
Given an array of N elements, where each element is at most K away from its target position, devise an algorithm that sorts in O(N log K) ti
...read more
Arrays
Sorting
Heap
Insertion Sort
cpp-priority-queue
DSA
Find Median from Running Data Stream
Last Updated: 03 October 2023
Given that integers are read from a data stream. Find the median of elements read so far in an efficient way.There are two cases for median
...read more
Microsoft
Amazon
Adobe
Yahoo
Google
Morgan Stanley
Oracle
Facebook
Belzabar
Hike
MAQ Software
SAP Labs
Ola Cabs
FactSet
Mathematical
Heap
array-stream
statistical-algorithms
Apple
median-finding
DSA
Time Complexity of building a heap
Last Updated: 17 June 2022
Consider the following algorithm for building a Heap of an input array A.BUILD-HEAP(A) heapsize := size(A); for i := floor(heapsize/2) dow
...read more
Analysis of Algorithms
Heap
DSA
Sliding Window Maximum (Maximum of all subarrays of size K)
Last Updated: 11 March 2024
Given an array and an integer K, find the maximum for each and every contiguous subarray of size K.Examples : Input: arr[] = {1, 2, 3, 1, 4
...read more
Arrays
Amazon
Flipkart
Directi
Zoho
SAP Labs
Queue
Heap
sliding-window
DSA
Print K largest(or smallest) elements in an array
Last Updated: 29 April 2024
Given an array arr[] of size N, the task is to printing K largest elements in an array. Note: Elements in output array can be in any orderEx
...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 !