Category Archives: Heap

Given an array arr[] of size N, the task is to find the number of operations to convert array elements to zero by decrementing theâ€¦ Read More
Given an array arr[] of N integers and an integer K, the task is to find the sum of maximum of the array possible whereinâ€¦ Read More
Given two arrays arr[] and brr[] containing integers. The task is to find the Kth largest product of a pair (arr[i], brr[j]). Examples:  Input: arr[]â€¦ Read More
Given an array arr[] of size N, the task is to find the sum of medians of all sub-array of odd-length. Examples: Input: arr[] =â€¦ Read More
Pre-requisite:  Linked List Data StructureStack vsHeap Memory Allocation The Linked List is a linear data structure, in which the elements are not stored at contiguousâ€¦ Read More
Given k linked lists each of size n and each list is sorted in non-decreasing order, merge them into a single sorted (non-decreasing order) linkedâ€¦ Read More
Given k linked lists each of size n and each list is sorted in non-decreasing order, merge them into a single sorted (non-decreasing order) linkedâ€¦ Read More
Given k linked lists each of size n and each list is sorted in non-decreasing order, merge them into a single sorted (non-decreasing order) linkedâ€¦ Read More
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. 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. 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