You are viewing a single comment's thread. Return to all comments →
Looks good! To make this even faster, you should loop through n/2 items and swap a[i] with a[n-1-i].
Arrays - DS
You are viewing a single comment's thread. Return to all comments →
Looks good! To make this even faster, you should loop through n/2 items and swap a[i] with a[n-1-i].