18 Problems
Heap
Master heap problems with detailed brute force and optimal solutions.
01
Implement a Maxheap MinHeap using arrays and recursion
Click to view brute force and optimal solutions
02
Sort an Array using heap (HeapSort)
Click to view brute force and optimal solutions
03
Maximum of all subarrays of size k
Click to view brute force and optimal solutions
04
k largest element in an array
Click to view brute force and optimal solutions
05
Kth smallest and largest element in an unsorted array
Click to view brute force and optimal solutions
06
Merge K sorted arrays [IMP]
Click to view brute force and optimal solutions
IMP
07
Merge 2 Binary Max Heaps
Click to view brute force and optimal solutions
08
Kth largest sum continuous subarrays
Click to view brute force and optimal solutions
09
Leetcode reorganize strings
Click to view brute force and optimal solutions
10
Merge K Sorted Linked Lists [V.IMP]
Click to view brute force and optimal solutions
IMP
11
Smallest range in K Lists
Click to view brute force and optimal solutions
12
Median in a stream of Integers
Click to view brute force and optimal solutions
13
Check if a Binary Tree is Heap
Click to view brute force and optimal solutions
14
Connect n ropes with minimum cost
Click to view brute force and optimal solutions
15
Convert BST to Min Heap
Click to view brute force and optimal solutions
16
Convert min heap to max heap
Click to view brute force and optimal solutions
17
Rearrange characters in a string such that no two adjacent are same
Click to view brute force and optimal solutions
18
Minimum sum of two numbers formed from digits of an array
Click to view brute force and optimal solutions