Advertisement
Krefeld187

Untitled

Mar 28th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public void insertionSort()
  2. {
  3. System.out.println("Insertionsort");
  4. for(int i = 1; i < MAX; ++i)
  5. {
  6. System.out.print(i + "." + " ");
  7. anzeigen(3);
  8. int key = i;
  9. for(int j = (i-1); j>=0 ; --j)
  10. {
  11. if(kopIns[j] > kopIns[key])
  12. {
  13. tausche(key,j,3);
  14. key = j;
  15. }
  16. }
  17. }
  18. System.out.print(MAX + "." + " ");
  19. anzeigen(3);
  20. }v
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement