Write code to find lexicographic minimum in a circular array, e.g. for the array BCABDADAB, the lexicographic minimum is ABBCABDADInput Constraint: 1 < n < 1000 Examples:...
Given a large positive number as string, count all rotations of the given number which are divisible by 4....
Given two strings s1 and s2, find if s1 is a substring of s2. If yes, return the index of the first occurrence, else return -1....
Write code to find lexicographic minimum in a circular array, e.g. for the array BCABDADAB, the lexicographic minimum is ABBCABDADInput Constraint: 1 < n < 1000 Examples:...
Given an integer X and two strings S1 and S2, the task is to check that string S1 can be converted to the string S2 by shifting characters circular clockwise atmost X times....
Given n strings that are permutations of each other. We need to make all strings same with an operation that takes front character of any string and moves it to the end.Examples:...
Given two strings str1 and str2 and an integer d, the task is to check whether str2 can be obtained by rotating str1 by d places (either to the left or to the right)....
Given a numeric string S, the task is to find the maximum length of a subsequence having its left rotation equal to its right rotation....
Given two strings, the task is to find if a string can be obtained by rotating another string two places....
Given a matrix of n*n size, the task is to find whether all rows are circular rotations of each other or not....
Given a string str, the task is to perform the following type of queries on the given string:...
Given a matrix of n*n size, the task is to find whether all rows are circular rotations of each other or not....