#include
#include
class QuiSort
{
int i,j,pivot;
public:
int n,a[20];
void quick(int a[],int left,int right);
void swap(int a[],int i,int j);
};
void QuiSort :: quick(int a[],int first,int last)
{
if(first=pivot&&j>first)
j--;
if(i>obj.n;
clrscr();
cout<<"\n\nEnter the element\n\n";
for(int i=0;i>obj.a[i];
obj.quick(obj.a,0,obj.n-1);
cout<<"\n\nThe sorted list is \n\n";
for(i=0;i
SAMPLE INPUT AND OUTPUT:
Enter the limit : 5
Enter the elements
5
4
3
2
1
The sorted list is
1 2 3 4 5
|