Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. void SortujKopiec(Zamowienie Kopiec [],int J)
  2. {
  3. Zamowienie bufor;
  4. for(int i=J;i>0;i--)
  5. {
  6. if (Kopiec[i].getPriority() > Kopiec[i/2].getPriority())
  7. {
  8. bufor = Kopiec[i];
  9. Kopiec[i] = Kopiec[i/2];
  10. Kopiec[i/2] = bufor;
  11. }
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement