Skip to content

Category Archives: Searching

Given a sorted array arr[] consisting of distinct numbers, the task is to find the length of the longest subarray that forms a Geometric Progression.… Read More
Given a matrix arr[][] and an integer K, the task is to find the smallest element from all possible square submatrices of size K from… Read More
Given two arrays A[] and B[], the task is to find the maximum number of uncrossed lines between the elements of the two given arrays.… Read More
Given a string str of length N, and Q queries of the following two types: (1 L R K): Find the Kth greatest character (non-distinct)… Read More
Given two integers L and R, the task is to find a pair of integers from the range [L, R] having LCM within the range… Read More
Given two strings start and target(both of the same length) and a list of strings str[], the task is to print all possible smallest sequences… Read More
Given an array arr[] of size N, the task is to print the count of non-palindromic numbers present in the given array whose first and… Read More
Given an integer K such that there is a set of all possible perfect squares, each of length K. From this set of perfect squares,… Read More
Given an array A[] consisting of N positive integers and an integer K, the task is to find the length of the smallest subarray with… Read More
Given an array A[] consisting of N positive integers, the task is to check if all the array elements are pairwise co-prime, i.e. for all… Read More
Given a string S and an integer N, the task is to check if it is possible to generate any string N times from the… Read More
There are some processes that need to be executed. The amount of load that process causes a server that runs it, is being represented by… Read More
Given a set of integers S, the task is to divide the given set into two non-empty sets S1 and S2 such that the absolute… Read More
Given an integer array arr[], the task is to split the given array into two subarrays such that the difference between their sum is minimum.… Read More