Given an array arr[] containing n integers. The problem is to find the length of the subarray having maximum sum. If there exists two or more subarrays with maximum sum then print the length of the longest subarray.Examples:...
Given an array arr[] of size N and an integer S, the task is to find the count of quadruplets present in the given array having sum S....
Given an array arr[] of size N, the task is to print the minimum count of equal length subsets the array can be partitioned into such that each subset contains only a single distinct element...
Given an array of strings arr[], consisting of strings made up of lowercase and uppercase letters, the task is to print all the strings from the given array that can be typed using keys from a single row of a QWERTY keyboard....
Given a n x n matrix of integers. The problem is to find the largest area rectangular sub-matrix having sum divisible by the given value k....
Given string S consists of lowercase and uppercase letters, the task is to find the number of substrings having an equal number of lowercase and uppercase letters....
Given an array of n words. Some words are repeated twice, we need to count such words....
Given N ranges and Q queries consisting of numbers. Every range consists of L and R. The task is to check if the given number lies in any of the given ranges or not for every query.Note: There is no overlapping range.Examples:...
Given a list of characters and an array of strings, find the total length of all strings in the array of strings that can be composed using the given characters.Examples:...
Given an array of integers, remove all the occurrences of those elements which appear strictly more than k times in the array.Examples:...
Given an array arr[] consisting of N integers and an integer K, the task is to reduce K to 0 by removing an array element from either end of the array and subtracting it from K. If it is impossible to reduce K to 0, then print “-1”. Otherwise, print the minimum number of such operations required....
Given an integer K and an array arr[] consisting of N integers, the task is to find the length of the subarray of smallest possible length to be removed such that the count of array elements smaller than and greater than K in the remaining array are equal....