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