Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void insertionSort(int vect[]) {
- for (int i = 0; i < 100; i++) {
- int eleito = vect[i];
- int j = i - 1;
- while (j >= 0 && vect[j] > eleito) {
- vect[j + 1] = vect[j];
- j = j - 1;
- }
- vect[j + 1] = eleito;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement