Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. do
  2. {
  3. while( tab[ i ] < pivot )
  4. {
  5. ++i;
  6. }
  7. while( tab[ j ] > pivot )
  8. {
  9. --j;
  10. }
  11. if( i <= j )
  12. {
  13. tmp = tab[ i ];
  14. tab[ i ] = tab[ j ];
  15. tab[ j ] = tmp;
  16. ++i;
  17. --j;
  18. }
  19. if( j > left )
  20. {
  21. quick_sort( tab, left, j );
  22. }
  23. if( i < right )
  24. {
  25. quick_sort( tab, i, right );
  26. }
  27. }while( i <= j );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement