Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int i=1; i < vector.length; i++)
- for(int j=0; j < vector.length-1; j++) { // if out of order
- if (vector[j] > vector[j+1]) {
- // exchange elements
- aux = vector[j];
- vector[j] = vector[j+1];
- vector[j+1] = aux;
- }
- }
RAW Paste Data