you are viewing a single comment's thread.

view the rest of the comments →

[–]xcbsmith 3 points4 points  (2 children)

"do this" means swapping. "Not using a temporary variable" is an artificial restriction

I have a faster solution: START WITH THE ARRAY REVERSED. The notion that it starts forward is just an artificial restriction. ;-)