Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void bubbleSort(int vect[]) {
- int n, i, aux;
- for (n = 1; n <= vect.length; n++) {
- for (i = 0; i < vect.length - 1; i++) {
- if (vect[i] > vect[i + 1]) {
- aux = vect[i];
- vect[i] = vect[i + 1];
- vect[i + 1] = aux;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement