##
Minimum rotations required to get the same string
July 17, 2017

Given a string, we need to find the minimum number of rotations required to get the same string. Examples: Input : s = “geeks” Output… Read More »

July 17, 2017

Given a string, we need to find the minimum number of rotations required to get the same string. Examples: Input : s = “geeks” Output… Read More »

July 4, 2017

Given an array of size n and multiple values around which we need to left rotate the array. How to quickly find multiple left rotations?… Read More »

July 1, 2017

Write code to find lexicographic minimum in a circular array, e.g. for the array BCABDADAB, the lexicographic minimum is ABBCABDAD Input Constraint: 1 < n… Read More »

June 11, 2017

Given two positive integers x and y, check if one integer is obtained by rotating bits of other. Input constraint: 0 < x, y <… Read More »

May 15, 2017

Given a string of size n, write functions to perform following operations on string. Left (Or anticlockwise) rotate the given string by d elements (where… Read More »

March 28, 2017

Given a large positive number as string, count all rotations of the given number which are divisible by 4. Examples: Input: 8 Output: 1 Input:… Read More »

March 16, 2017

Given two strings, the task is to find if a string can be obtained by rotating another string two places. Examples: Input : string1 =… Read More »

March 12, 2017

Given a square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space. Examples: Input 1 2 3 4 5 6… Read More »

March 1, 2017

Consider an array of distinct numbers sorted in increasing order. The array has been rotated (anti-clockwise) k number of times. Given such an array, find… Read More »

January 14, 2017

Given a matrix of n*n size, the task is to find whether all rows are circular rotations of each other or not. Input: mat[][] =… Read More »

November 19, 2016

Given a matrix of order M*N and a value K, the task is to rotate each ring of the matrix anticlockwise by K elements. If… Read More »

July 27, 2016

Given an array arr[] of n integers, find the maximum that maximizes sum of value of i*arr[i] where i varies from 0 to n-1. Examples:… Read More »

May 18, 2016

Given an square matrix, turn it by 90 degrees in anti-clockwise direction without using any extra space. Examples: Input 1 2 3 4 5 6… Read More »

September 17, 2015

Given an array, only rotation operation is allowed on array. We can rotate the array as many times as we want. Return the maximum possbile… Read More »

July 30, 2015

Given a matrix, clockwise rotate elements in it.