Skew Heap: So basically, Skew Heap is a heap data structure implemented as a binary tree. Skew Heap has an advantage over binary trees as skew heaps merge more quickly...
Problem Statement: In this problem, we have given an array, and we have to sort the array in decreasing order using a min-heap. Example: Input : arr[] = {1, 50,...
CONCEPTS USED: Heaps. DIFFICULTY LEVEL: Easy. PROBLEM STATEMENT(SIMPLIFIED): Given an array containing N integers, your task is to create a min-heap using the elements of the given array and print...
CONCEPTS USED: Heaps. DIFFICULTY LEVEL: Easy. PROBLEM STATEMENT(SIMPLIFIED): Given an array containing N integers, your task is: To create min-heap(Insert elements one by one). Extract the minimum element from the...
Concepts Used Heap Difficulty Level Hard Problem Statement : Given an array of N integers, we want to know whether it is possible to divide the students into contiguous groups...
Concepts Used Heap Difficulty Level Medium Problem Statement : Given an array A of size N, we have to perform following operations, untill only one integer remains (N-1 times) :...
Concepts Used Heap Difficulty Level Medium Problem Statement : We are given N elements with an integer S. We want to find such a sub-array that has the maximum possible...
Concepts Used : Heap Difficulty Level : Easy Problem Statement : Given an array containing N integers, our task is to: Create min-heap with 1 based indexing. Remove the element...
Concepts Used: Heap Difficulty Level: Hard Problem Statement : Given a string str, find first K non-repeating characters in lexicographical order, if all the characters are repeating then print "Not...
Concepts Used: Heap Difficulty Level: Easy Problem Statement : Given an array containing N integers, our task is to create a min-heap using the elements of the given array and...
Concepts Used Heap Difficulty Level: Hard Problem Statement : Given N sectors and two integers P and Q, our task is to find Q closest sectors to P sector. See...
In the realm of data structures, heaps stand out as an essential tool for efficient manipulation of priority-based information. One common problem encountered when dealing with heaps is finding the...
Concepts Used Heap Difficulty Level Medium Problem Statement : Given a string str and an integer q. We have to generate a string S such that it is lexicographically smallest...
Concepts Used Heap Difficulty Level Medium Problem Statement : We are given N book costs, and k amount of money. We need to find the maximum number of books we...
Concepts Used Heap Difficulty Level Easy Problem Statement : Given N integers where a[i] represent that a[i]th student has won the ith competition. Print top Q students who have won...