## Generate all rotations of a number

Given an integer n, the task is to generate all the left shift numbers possible. A left shift number is a number that is generated… Read More »

## Python | Ways to rotate a list

The rotation of a list has been discussed earlier also, but this particular article focuses on shorthands and various short techniques to achieve this in… Read More »

## Generating Lyndon words of length n

Given an integer n and an array of characters S, the task is to generate Lyndon words of length n having characters from S. A… Read More »

## Check whether all the rotations of a given number is greater than or equal to the given number or not

Given an integer x, the task is to find if every k-cycle shift on the element produces a number greater than or equal to the… Read More »

## Rotate the sub-list of a linked list from position M to N to the right by K places

Given a linked list and two positions ‘m’ and ‘n’. The task is to rotate the sublist from position m to n, to the right… Read More »

## Check if it is possible to sort the array after rotating it

Given an array of size N, the task is to determine whether its possible to sort the array or not by just one shuffle. In… Read More »

## Maximum contiguous 1 possible in a binary string after k rotations

Given a binary string, you can rotate any substring of this string. For Example, let string be denoted by s. Let the first element of… Read More »

## Generating numbers that are divisor of their right-rotations

Given a number m, find all numbers which have m digits and are a divisor of their right-rotation. Right-rotation of a number N is the… Read More »

## Check if an array is sorted and rotated clockwise

Given an array of N distinct integers. The task is to write a program to check if this array is sorted and rotated clockwise. A… Read More »

## Rotate a matrix by 90 degree in clockwise direction without using any extra space

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 »

## Elements that occurred only once in the array

Given an array arr that has numbers appearing twice or once. The task is to identify numbers that occurred only once in the array. Note:… Read More »

## Split the array and add the first part to the end | Set 2

Given an array and split it from a specified position, and move the first part of array add to the end. Examples: Input : arr[]… Read More »

## Amazon Interview Experience

Round: I An Array arr={7, 7, 8, 8, 9, 1, 1, 4, 2, 2} has numbers appearing twice or once. Duplicates appear side by side… Read More »

## Check if strings are rotations of each other or not | Set 2

Given two strings s1 and s2, check whether s2 is a rotation of s1. Examples: Input : ABACD, CDABA Output : True Input : GEEKS,… Read More »

## Rotate Doubly linked list by N nodes

Given a doubly linked list, rotate the linked list counter-clockwise by N nodes. Here N is a given positive integer and is smaller than the… Read More »