Advertisement
Guest User

Untitled

a guest
Nov 8th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. for(int iter = 0; iter < list.getSize(); iter++) {
  2.  
  3. for(int i=0;i<list.getSize()-(iter+1);i++) {
  4. if (list.getFirst() > list.getSecond()) {
  5. list.swap();
  6. list.pop();
  7. } else {
  8. list.pop();
  9. }
  10. }
  11. int j=0;
  12. while(j<(iter+1)){
  13. list.pop();
  14. j++;
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement