QuickSort

[] http://innf.weebly.com/merge-sort.html

**Varianta iterativa**
void main { int i,j,n,aux,st,dr,mijl,a[50]; cin>>n; for(i=1;i<=n;i++)cin>>a[i]; for(i=2;i<=n;i++) { aux=a[i];st=1;dr=i-1; while(st<=dr) { mijl=(st+dr)/2; if(aux=st) {a[j+1]=a[j]; j--; } a[st]=aux; } for(i=1;i<=n;i++) cout<

http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/lecture-4-quicksort-randomized-algorithms/

**Varianta recursiva**
int v[100],n; void qsort(int li,int lf) { int i,j,mij,aux; i=li;j=lf; //li=limita initiala, lf=limita finala// //mij=v[(li+lf)/2];// elementul din mijloc while(i<=j) { while (v[i]>n; for(i=1;i<=n;i++) cin>>v[i]; qsort(1,n); for(i=1;i<=n;i++) cout<