Skip to content

Category Archives: Searching

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 a binary matrix mat[][] having dimensions N * M and a binary string S of length N + M – 1 , the task… 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
Given an array arr[] consisting of N integers, the task is to print the length of the longest subarray with a positive product. Examples: Input:… Read More
Given an array of strings arr[] where each string is of the form “name:number” and a character T as input, the task is to generate… Read More