Created
December 5, 2014 16:15
-
-
Save jacks205/051009234c57ca74a73f 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
static int[] bubblesort(int[] numbers) | |
{ | |
int tempVar; | |
for (int i = 0; i < numbers.length; i++) | |
{ | |
for(int j = 0; j < numbers.length; j++) | |
{ | |
if(numbers[i] > numbers[j + 1]) | |
{ | |
tempVar = numbers [j + 1]; | |
numbers [j + 1]= numbers [i]; | |
numbers [i] = tempVar; | |
} | |
} | |
} | |
return numbers; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment