Created
April 30, 2016 23:40
-
-
Save twof/fc9b102fa2f25e2311ab19a172f1419c to your computer and use it in GitHub Desktop.
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
bool sorted = false; | |
while(!sorted){ | |
sorted = true; | |
for (int i=startIndex; i<SIZE-startIndex-1; ++i){ | |
if (sortableArray[i]>sortableArray[i+1]) { | |
swap(i, i+1, sortableArray); | |
sorted = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment