/* primer55.c - quicksort - 2. varijanta */ #include void qs( int [], int, int ); void trampa( int *, int *); int T[10] = { 4, 77, 1, 9, 56, 33, 11, 3, 6, 1}; int inf = 0, sup = 9; void main() { int i; qs( T, inf, sup ); for(i = 0; i < 10; i++ ) printf("%d ", T[i] ); } void qs( int T[], int inf, int sup ) { int i, j; int tempr; /* Particija */ while ( sup > inf ) { i = inf; j = sup; tempr = T[inf]; /*** Podeli niz u dva ***/ while ( i < j ) { for ( ; T[j] > tempr; j-- ); for ( T[i]=T[j]; i