Created
January 2, 2014 11:55
-
-
Save rowlo/8218194 to your computer and use it in GitHub Desktop.
Reverse QList one-line with max and size initialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(int k=0, s=list.size(), max=(s/2); k<max; k++) list.swap(k,s-(1+k)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment