在假设二维表数据的排列服从均匀分布的条件下,分析了用快速排序方法对二维表进行排序的过程,给出了整个排序过程的时间复杂度和空间复杂度,得到的平均时间复杂度(O(n×(m+logn)))低于已有文献中对二维表排序的时间复杂度(O(m×n×logn)),其中,m是二维表的关键字个数,n是二维表的记录数.仿真实验说明了文中结论的正确性.这一结果,将有助于进一步设计高效的海量数据分析方法.
Suppose the data in a two dimension table is uniform distribution, the problem of sorting a two dimension table with quick sort algorithm is analyzed. Its average time complexity and space complexity are resulted. The result of the average time complexity for sorting a two dimension table, O(n× (m+logn)), corrects and improves already known result (O(m× n × log n)) in literatures, where, m is the number of its keywords, and n is the number of its records. Simulation experiment results illustrate the validity of the result of this paper. This result would be very helpful for designing efficient algorithms for huge data processing.