Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
let BubbleSort (lst : list<int>) =
|
||||
let rec sort accum rev lst =
|
||||
match lst, rev with
|
||||
| [], true -> accum |> List.rev
|
||||
| [], false -> accum |> List.rev |> sort [] true
|
||||
| x::y::tail, _ when x > y -> sort (y::accum) false (x::tail)
|
||||
| head::tail, _ -> sort (head::accum) rev tail
|
||||
sort [] true lst
|
||||
Loading…
Add table
Add a link
Reference in a new issue