Rotation means simply shifting elements of an array by a specified number of positions. Rotations can be of 2 types: left and right. Other methods include block-swap algorithm, reversal algorithm, juggling algorithm, etc. We know, one code can be written in many ways. But, choosing an optimal code is the ultimate goal.
Sort: