Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec QuickSort(input : List<int>) =
- match input with
- | [] -> []
- | head :: tail ->
- let smaller = qsort (tail |> List.filter(fun e -> e <= x))
- let larger = qsort (tail |> List.filter(fun e -> e >= x))
- smaller @ [head] @ larger
Add Comment
Please, Sign In to add comment