摘要:
F# 的快排实现起来很简单,因为集合类List里面的方法帮用户实现了大部分的代码。下面就是就是代码:let rec quickSort (list : int list) = match list with | [] -> [] | [single] -> [single] | head :: tail -> let leftList = tail |> List.choose(fun item -> if item <= head then Some(item) else No... 阅读全文
posted @ 2012-11-21 15:25
ZackZhou
阅读(382)
评论(0)
推荐(0)

浙公网安备 33010602011771号