Created
September 17, 2018 05:56
-
-
Save afishr/446bbc4b52bd60ed34afa1248f36426e 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
// Bubble sort | |
for (int i = 0; i < N; i++) | |
{ | |
for (int j = 0; j < N - i; j++) | |
{ | |
if (array[j] > array[j + 1]) | |
{ | |
swap(array[j+1], array[j]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment