Created
May 29, 2017 05:25
-
-
Save vaidehijoshi/932fad61bb03edcaa6a877d181751a99 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
> selectionSort([33,2,52,106,73]); | |
> comparing 33 and 2 | |
> comparing 2 and 52 | |
> comparing 2 and 106 | |
> comparing 2 and 73 | |
> swapping the number 2 for the number 33 | |
> numbers currently looks like: 2,33,52,106,73 | |
> comparing 33 and 52 | |
> comparing 33 and 106 | |
> comparing 33 and 73 | |
> numbers currently looks like: 2,33,52,106,73 | |
> comparing 52 and 106 | |
> comparing 52 and 73 | |
> numbers currently looks like: 2,33,52,106,73 | |
> comparing 106 and 73 | |
> swapping the number 73 for the number 106 | |
> numbers currently looks like: 2,33,52,73,106 | |
>> (5) [2, 33, 52, 73, 106] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment