Skip to content

Category Archives: Heap

Given a number X, and an array arr[] of length N containing the N numbers. The task is to find the minimum number of operations… Read More
Given a rod of length L and an array arr[] of length N, the task is to find if it is possible to break the… Read More
Given an Array input[] consisting only of 1s initially and an array target[] of size N, the task is to check if the array input[]… Read More
Given a sentence S of size N where each word is a concatenation of a numeric part followed by a bunch of characters. The task… Read More
Given an array arr[] of size N where arr[i] is in the form [xi, yi] denoting a point (xi, yi) on a 2D plane. The… Read More
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

Start Your Coding Journey Now!