Created
March 28, 2012 07:37
-
-
Save rhysforyou/2224513 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| SET sorted to true | |
| DO | |
| SET sorted to true | |
| IF value1 > value2 | |
| SET temp to value1 | |
| SET value1 to value2 | |
| SET value2 to temp | |
| SET sorted to false | |
| END | |
| IF value2 > value3 | |
| SET temp to value2 | |
| SET value2 to value3 | |
| SET value3 to temp | |
| SET sorted to false | |
| END | |
| . . . | |
| IF value(n-1) > value(n) | |
| SET temp to value(n-1) | |
| SET value(n-1) to value(n) | |
| SET value(n) to temp | |
| SET sorted to false | |
| END | |
| WHILE not sorted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment