C程序設計

編寫一個函數,把整數序列分成兩個部分,使得左邊部分都不大於右邊部分,不需要排序。 ( 考察的是快速排序的部分) #include<stdio.h> int yitang(int left,int right,int arr[]){ int a=arr[left]; while(left<right){ while(left<right&&arr[right]>a)right--;
相關文章
相關標籤/搜索