# 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