daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Mar 19th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     public Pojazd segreguj(Pojazd pojazd) {
  2.         aktualny = head;
  3.         boolean posegregowano = false;
  4.         while(aktualny.next != tail && !posegregowano) {
  5.             if(aktualny.next.getSamochod().getRocznik() >= pojazd.getSamochod().getRocznik()) {
  6.                 pojazd.next = aktualny.next;
  7.                 aktualny.next = pojazd;
  8.                 posegregowano = true;
  9.             }
  10.             aktualny = aktualny.next;
  11.             performance++;
  12.         }
  13.        
  14.         if(!posegregowano) {
  15.             pojazd.next = aktualny.next;
  16.             aktualny.next = pojazd;
  17.         }
  18.        
  19.         return pojazd;
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top