123 Eng

### Engineering the engineers™

Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

Computer Science / IT
Electronics
Electrical
Mechanical
Chemical
Civil

CAT / MBA

GMAT / Foreign MBA
Latest Jobs

Displaying  Source Code(s)

 -------------------------------------------------------------------------------- Quick Sort Implementation -------------------------------------------------------------------------------- Description : The following is the code in which i have implemented Quick sort(fastest sortin algorithm)Time Complexity-n*(logn).. go thrgh the code and it is free for use.any comments abt the code are welcome /*Quick Sort Algorithm developed by Vivek Tiwari 27-6-2004*/ #include #include #include #include int Partition(int low,int high,int arr[]); void Quick_sort(int low,int high,int arr[]); void main() { int *a,n,low,high,i; clrscr(); cout<<"/**************************Quick Sort Algorithm Implementation*****************/
; cout<<"Enter number of elements:
; cin>>n; a=new int[n]; /* cout<<"enter the elements:
; for(i=0;i>a;*/ for(i=0;i; for(i=0;i; high=n-1; low=0; Quick_sort(low,high,a); cout<<" Final Array After Sorting:
; for(i=0;ilow) { high_vac=arr[high]; while(pivotlow_vac) { if(high<=low) break; low++; low_vac=arr[low]; } arr[high]=low_vac; } arr[low]=pivot; return low; } void Quick_sort(int low,int high,int arr[]) { int Piv_index,i; if(low

Contribute content or training reports / feedback / Comments
job placement papers