+ 1
My code is taking too much time to execute how can i optimise .
Reverse an array https://code.sololearn.com/cpxum5CjOb50/?ref=app
2 Respuestas
+ 1
Thankyou so much
0
Try this for the swapping loop instead of a `while` loop ...
for (i = 0, j = n - 1; i < n / 2; i++, j--)
{
temp = a[i];
a[i] = a[j];
a[j] = temp;
}