Question: The function shiftLeft() slides the elements in an array to the left position and rotates the first element to the back of the array. void
The function shiftLeft() slides the elements in an array to the left position and rotates the first element to the back of the array.
void shiftLeft (int arr[], int n) { int i, temp = arr[0]; for (i = 0; i < n-1; i++) arr[i] = arr[i+1]; arr[n-1] = temp; }
Write a template version of shiftLeft()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
