Skip to content

Category Archives: Heap

Given an array of integers. Write a program to find the K-th largest sum of contiguous subarray within the array of numbers which has negative… Read More
Given an array of integers arr[] of size N and an integer K, the task is to find the K-th smallest pair sum of the… Read More
Given an infinite stream of integers, find the k’th largest element at any point of time.Example:  Input:stream[] = {10, 20, 11, 70, 50, 40, 100,… Read More
Given K sorted linked lists of size N each, merge them and print the sorted output. Examples:  Input: k = 3, n = 4 list1… Read More
Given K sorted linked lists of size N each, merge them and print the sorted output. Examples:  Input: k = 3, n = 4 list1… Read More
Given K sorted linked lists of size N each, merge them and print the sorted output. Examples:  Input: k = 3, n = 4 list1… Read More
Given K sorted linked lists of size N each, merge them and print the sorted output. Examples:  Input: k = 3, n = 4 list1… Read More
Given an array arr[] of size N, the task is to find the minimum number of operations required to make all array elements zero. In… Read More
Given an infinite stream of integers, find the k’th largest element at any point of time.Example:  Input: stream[] = {10, 20, 11, 70, 50, 40,… Read More
Given an array arr[] of size N and an integer X, the task is to find the length of the longest subsequence such that the… Read More
Given a positive integer K and a weighted undirected connected graph of N nodes and E edges as an array Edges[] of the type {u,… Read More
Given an array arr[] consisting of N integers and an array Query[][] consisting of M pairs of the type {L, R}, the task is to… Read More
Given a Binary Tree consisting of N nodes and a positive integer K, the task is to find the Kth largest number in the given… Read More
Given an array arr[] consisting of N integers, the task is to find the maximum number of pairs of array elements such that each pair… Read More
Given three arrays X[], Y[], and Z[] each consisting of N integers, the task is to find the maximum number of triplets (X[i], Y[i], Z[i])… Read More

Start Your Coding Journey Now!