public class deneme
{

public static void quickSort(double A[])
{
int p=0;
int r=A.length-1;
quickSort(A,p,r);
}
	
public static void quickSort(double A[],int p, int r)
{	
	int q;
    if(p<r)
    {
        q=partition(A,p, r);
        quickSort(A,p, q-1);
        quickSort(A,q+1, r);
    }
}

public static int partition(double A[],int p, int r){
    double tmp;
    double x = A[r];
    int i = p-1;

    for(int j=p; j<=r-1; j++)
    {
        if(A[j]<=x)
        {
            i++;
            tmp=A[i];
            A[i]=A[j];
            A[j]=tmp;
        }
    }
    tmp=A[i+1];
    A[i+1]=A[r];
    A[r]=tmp;
    return i+1;
}

public static void main(String arg[])
{double a[]={88,31,52,25,98,14.1,30,62,23,79 };
quickSort(a,0,a.length-1);
System.out.println(Matrix.toStringT(a));
}
}