a={77,5,332,1,3}local low,hight,i,jfunction q(low,hight)		local key=a[low]	 i=low	 j=hight	if(i>=j)then		return		end	while(i<j)do         while(i<j and a[j]>key)do                 j=j-1;				end			if(i<j)then				a[i]=a[j]				i=i+1			end				while (i<j and a[i]<key)do		    i=i+1			end			if(i<j)then				a[j]=a[i]				j=j-1;			end					       end	a[i]=key	q(low,i)	q(i+1,hight)	endq(1,5)PRint(a[1].." ",a[2].." ",a[3].." ",a[4].." ",a[5])這個思路。。就是快排的思路。改成lua代碼就好了。。分小塊來排序 
新聞熱點
疑難解答