You are viewing a single comment's thread. Return to all comments →
My C Solution:
int* reverseArray(int a_count, int* a, int* result_count) { *result_count = a_count; int temp; int end = a_count-1; for(int i = 0; i < a_count/2; i++){ temp = *(a+end); *(a+end) = *(a+i); *(a+i) = temp; end--; } return a;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Arrays - DS
You are viewing a single comment's thread. Return to all comments →
My C Solution:
}