Given a circular array arr[] of N integers and an integer K, the task is to print the array after the following operations: If K… Read More

# Category Archives: Searching

Given string str, the task is to find the rank of the given string among all its substrings arranged lexicographically. Examples: Input: S = “enren”Output:… Read More

Given an array arr[] consisting of N integers in non-increasing order, representing citations, the task is to find the H-index. H-Index is usually assigned to… Read More

Given an array arr[] of size N, the task is to print the distance of every array element from its next greater element. For array… Read More

Given an array arr[] consisting of N integers, the task is to check if it is possible to sort the array using the following swap… Read More

Given an integer N, the task is to check if the Digit Cube limit of an integer arrives at a fixed point or in a… Read More

Given an array arr[] of N integers, the task is to find the minimum possible absolute difference between indices of a special pair. A special… Read More

Given an integer N, the task is to reduce the number and form a key by following the operations given below: Extract the Most Significant… Read More

Given an array arr[] consisting of N integers, the task is to count the number of tuples (i, j, k, l) from the given array… Read More

Given string str of length N only consisting of characters ‘N’, ‘S’, ‘E’, or ‘W’, each representing moving one unit North, South, East, or West,… Read More

Given an array arr[], select any subarray and apply any one of the below operations on each element of the subarray: Increment by one Decrement… Read More

Given a string str, the task is to find the substring of length K which occurs the maximum number of times. If more than one… Read More

Given two strings A and B, the task is to find lexicographically the smallest permutation of string B such that it contains every substring from… Read More