标签:
快速排序
def sort(xs: Array[Int]): Array[Int] = if (xs.length <= 1) xs else { val pivot = xs(xs.length / 2) Array.concat( sort(xs filter (pivot >)), xs filter (pivot ==), sort(xs filter (pivot <))) }
标签:
原文地址:http://www.cnblogs.com/zhanggl/p/5021247.html