mohammadimtiazz / leftRightRotation

Algorithm for rotating an array in both left and right direction.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

leftRightRotation

Algorithm for rotating an array in both left and right direction.

A left rotation operation on an array of size shifts each of the array's elements 1 unit to the left. For example, if 2 left rotations are performed on array [1,2,3,4,5], then the array would become [3,4,5,1,2].

and 2 right rotation would look like [4,5,1,2,3].

About

Algorithm for rotating an array in both left and right direction.


Languages

Language:C++ 100.0%