fork download
  1. let rec qsort = function | [] -> []
  2. | h::t -> qsort [for e in t do if (e <= h) then yield e]
  3. @ [h] @
  4. qsort [for e in t do if (e > h) then yield e]
  5.  
  6. let r = new System.Random()
  7.  
  8. let main() =
  9. let sample = List.init 300 (fun _-> r.Next(System.Int32.MaxValue))
  10. System.Console.WriteLine(qsort sample)
Success #stdin #stdout 0.04s 11192KB
stdin
Standard input is empty
stdout
Standard output is empty