快速排序程序
#include"stdafx.h"
#defineLEN8
intarray[LEN]={45,23,55,1,32,3,56,10};
voidoutputList()for(inti=0; i
intpartition(intlow,inthigh)inttmp=array[low];百度快速排名软件。百度快排软件
intpivotkey=array[low] ];
while(low
array[low]=array[high];
while(low
array[high]=array[low];array[low]=tmp;快速排名seo软件。
returnlow;voidqSort(intlow,inthigh)if(low
qSort(low,pivotloc-1);百度快速排名。
outputList();百度关键词快速排名。
qSort(pivotloc+1,high);voidmain()printf("Thedatabeforesort:\outputList();
qSort(0,LEN-1);
printf("Thedataaftersort:\outputList();
快速排序程序