#include using namespace std; class Numbers { int *list; int n,size; public: Numbers(int s) { size=s; list=new int[size]; } void read() { cout<<"enter the number of elements"; cin>>n; cout<<"enter the elements:"; for (int **0;i>list[i]; } } void display() { cout<<" the elements are:"; for (int **0;i=ub) return; // list with less than two elements key=list[lb]; **lb+1; j=ub; do { while(i<=ub && list[i]=lb && list[j]>key) j--; if(i=list[j+1]) { list[j]+=list[j+1], list[j+1]=list[j]-list[j+1], list[j]=list[j]-list[j+1]; // interchange without using temp variable } // or use a simple interchange function using temp } }; int main() { Numbers n1(10); n1.read(); n1.display(); cout<<"\n"; n1.QuickSort(0,n1.getn()-1); cout<<"\n"; n1.display(); cout<<"\n"; n1.read(); n1.display(); cout<<"\n"; n1.bubblesort(); cout<<"\n"; n1.display(); }