Question: Write a function void rotate_left(int a[], int size, int n) which will rotate array a, of size size, n positions to the left. This will
Write a function void rotate_left(int a[], int size, int n) which will "rotate" array "a", of size "size", n positions to the left. This will rearrange the elements of a by moving them n positions in a counterclockwise direction. For example, let a=[2, 4.6, 4, 8]. size = 5. If n=3, then the result of calling rotate_left (a, 5, 3) will the 6 to the leftmost position and the array a will be[4, 8, 2, 4, 6]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
