## Rotate the matrix right by K times

Given a matrix of size N*M, and a number K. We have to rotate the matrix K times to the right side. Examples: Input :… Read More »

## Reversal algorithm for right rotation of an array

Given an array, right rotate it by k elements. After K=3 rotation Examples: Input: arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9,… Read More »

## Find a rotation with maximum hamming distance

Given an array of n elements, create a new array which is a rotation of given array and hamming distance between both the arrays is… Read More »

## Queries on Left and Right Circular shift on array

Given an array A of N integers. There are three type of type of commands: 1 x : Right Circular Shift the array x times.… Read More »

## Count rotations divisible by 8

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

## String slicing in Python to rotate a string

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 »

## Rotate a Matrix by 180 degree

Given a square matrix the task is that we turn it by 180 degrees in anti-clockwise direction without using any extra space. Examples : Input… Read More »

## Minimum move to end operations to make all strings equal

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… Read More »

## Sort a Rotated Sorted Array

You are given a rotated sorted array and your aim is to restore its original sort in place. Expected to use O(1) extra space and… Read More »

## Count rotations in sorted and rotated linked list

Given a linked list of n nodes which is first sorted, then rotated by k elements. Find the value of k. Recommended: Please try your… Read More »

## Find element at given index after a number of rotations

An array consisting of N integers is given. There are several Right Circular Rotations of range[L..R] that we perform. After performing these rotations, we need… Read More »

## Split the array and add the first part to the end

There is a given an array and split it from a specified position, and move the first part of array add to the end. Examples:… Read More »

## Rotate Linked List block wise

Given a Linked List of length n and block length k rotate in circular manner towards right/left each block by a number d. If d… Read More »

## Print left rotation of array in O(n) time and O(1) space

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

## Minimum rotations required to get the same string

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 »