AD1

Saturday, 17 June 2017

C program to left rotate an array

Write a program to left rotate an array by n position
Example
Input
Input 10 elements in array: 1 2 3 4 5 6 7 8 9 10
Input number of times to rotate: 3
Output
Array after left rotation: 4 5 6 7 8 9 10 1 2 3
Solution

No comments:

Post a Comment