Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do
- {
- while( tab[ i ] < pivot )
- {
- ++i;
- }
- while( tab[ j ] > pivot )
- {
- --j;
- }
- if( i <= j )
- {
- tmp = tab[ i ];
- tab[ i ] = tab[ j ];
- tab[ j ] = tmp;
- ++i;
- --j;
- }
- if( j > left )
- {
- quick_sort( tab, left, j );
- }
- if( i < right )
- {
- quick_sort( tab, i, right );
- }
- }while( i <= j );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement