# Category Archives: Arrays

Given an array of strings arr[], where each arr[i] represents a single sentence with no leading or trailing spaces. Return the count of the maximumâ€¦ Read More
Given an array, arr[] of size N, the task is to find the sum of the at most K non-overlapping contiguous subarray within an arr[]â€¦ Read More
Given four integers A, B, C, and D, the task is to find the maximum sum of the given numbers by using the below operationsâ€¦ Read More
Given an array, arr[] of integers and an integer K, the task is to print true if there are K consecutive even numbers present elseâ€¦ Read More
Given an array arr[] of integers, the task is to find the length of the second longest increasing subsequence (LIS). Examples: Input: arr[] = {1,â€¦ Read More
Given an array of strings, the task is to print “Yes” if it contains a string that is a prefix of another string otherwise, printâ€¦ Read More
Given an array X[]. By using the given operation, you need to return the number of elements having the same initial value except 1 andâ€¦ Read More
Given N poles, each pole consists of hi number of vertices. Vertices on each pole are numbered from 1 to hi, the task is toâ€¦ Read More
Given a binary string S of length N along with Y[] of size K. Then you have to perform K number of queries for eachâ€¦ Read More
Given an array arr[]of size N. We have to pair the integers such that each integer should be in exactly one pair and each sumâ€¦ Read More
Given a square binary matrix[][] of size n*n. Find the minimum number of operations (changes) needed in a binary matrix to make it the same asâ€¦ Read More
In this article, we will discuss the grail sort. Grail sort is a sorting algorithm that was introduced by Vladimir Yaroslavskiy. It is an efficientâ€¦ Read More
Given an array arr[] of length N, the task is to check if we can make all elements of the array equal by taking twoâ€¦ Read More
Given an array X[] of odd length N(N â‰¥ 3) and an integer K. Arrange elements of X[] in such a way that the mergedâ€¦ Read More
Given an array arr[] of length n which contains positive integers (0 â‰¤ arr[i] â‰¤ 109), the task is to count the number of elementsâ€¦ Read More