Guest User

Untitled

a guest
Mar 22nd, 2015
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. void qs_prawy(int i, int j)
  2. {
  3. int lewy = i, prawy = j;
  4. int piwot=tabqs[prawy];
  5. int current = lewy;
  6.  
  7. for (current; current < prawy; current++)
  8. {
  9. if (tabqs[current] < piwot)
  10. {
  11. swap(tabqs[current], tabqs[lewy]);
  12. lewy++;
  13. }
  14. }
  15. swap(tabqs[lewy], tabqs[prawy]);
  16. qs_prawy(0, lewy);
  17. qs_prawy(lewy+1, prawy);
  18.  
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment