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
Category Archives: Queue
Given an array arr[] of size N, sorted based on the absolute value of its elements. The task is to sort this array based on… Read More
Given a numeric string target of length N and a set of numeric strings blocked, each of length N, the task is to find the… Read More
Given a numeric string target of length N and a set of numeric strings blocked, each of length N, the task is to find the… Read More
Given an array arr[] and an integer N, the task is to find the maximum number of pairs that can be formed such that ith… Read More
Given an array arr[] of integers of size N, the task is to count the number of elements whose value is greater than all the… Read More
Given a 2-D array matrix[][] of size ROW * COL and an integer K, where each cell matrix[i][j] is either 0 (empty) or 1 (obstacle).… Read More
Given an array interval of length N, where each element represents three values, i.e. {startTime, endTime, value}. The task is to find the maximum sum… Read More
Given two flavors of ice-cream chocolate and vanilla denoted by 0 and 1 respectively. People are standing in queue to get their desired flavor of… 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 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 Binary Tree, the task is to find the sum of leaf nodes at every level of the given tree. Examples: Input: Output:0063012Explanation:Level 1:… Read More
Given a queue consisting of the first N natural numbers and queries Query[][] of the type {E, X}, the task is to perform the given… Read More
The queue is an abstract data type which is defined by following structure and operations. Queue is structured as an ordered collection of items which… Read More