写一程序实现快速排序. 假设数据输入为一文件
14 查阅
参考答案:
快速算法描述如下
\r\n
Algorithm Partition
Input: sequence a0, ..., an-1 with n elements
Output: permutation of the sequence such that
all elements a0, ..., aj are less than or equal to all
elements ai, ..., an-1 (i > j)