Professional Documents
Culture Documents
4&5
4&5
]
swap(A[i, A[j]) Mundo last swap when i> j
swap(A/l], ALi)
return j
DAA Laboratory Manual (I8CSL47) Page 34
& scanned with OKEN ScannerDept. of CSE SLT
Ol SE Sy
CODE:
import java.util.
import java.io.*; |
public class P4 {
static int []
static int n;
static boolean flag ~ -true;
public static void quicksort (int [] a,int low,int high)
{
ant islow,j=high;
int temp;
Ant pivot = a[(lowthigh) /2]7
if(£lag)
( ;
while (i<=}) {
: ‘
while (a(t) You might also like