And the solution is
#include <iostream>
#include <iomanip>
using namespace std;
int vArray[] = {1,2,3,4,5,6,7,8,9};
const int vsize = 9;
void rotateLeft(int foo[], int size) {
int temp;
Type: Posts; User: Efe
And the solution is
#include <iostream>
#include <iomanip>
using namespace std;
int vArray[] = {1,2,3,4,5,6,7,8,9};
const int vsize = 9;
void rotateLeft(int foo[], int size) {
int temp;
yes!
why couldn't i think of it, swapping two adjacent elements would work,
Thanks Thantos,
I will try this solution and post it here.
I need a recursive function, not iterative or not a loop
an exercise;
I want to write a recursive function that rotates left an integer array, i.e. the given array
1 2 3 4
will be
2 3 4 1
after the function executed.
for this I write
#include...