Guest User

Untitled

a guest
Jun 21st, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. let rec QuickSort(input : List<int>) =
  2. match input with
  3. | [] -> []
  4. | head :: tail ->
  5. let smaller = qsort (tail |> List.filter(fun e -> e <= x))
  6. let larger = qsort (tail |> List.filter(fun e -> e >= x))
  7. smaller @ [head] @ larger
Add Comment
Please, Sign In to add comment