Commit c80e4c4c authored by Taddeus Kroes's avatar Taddeus Kroes

funclang series4: Removed unused commented code from quickSort.

parent e256c17d
...@@ -8,17 +8,6 @@ let rec quickSort (l:int list) = ...@@ -8,17 +8,6 @@ let rec quickSort (l:int list) =
let cmp x = x < pivot in let cmp x = x < pivot in
let low, high = partition cmp rest in let low, high = partition cmp rest in
quickSort low @ pivot :: quickSort high quickSort low @ pivot :: quickSort high
(*let rec assign low high l =
match l with
(* Assigning elements is done, sort the lower and higher sublists
* individually and concatenate them with the pivot *)
| [] -> quickSort low @ pivot :: quickSort high
(* Assign a list element to the lower or higher sublist,
* depending on its comparison to the pivot *)
| h::t -> if h <= pivot then assign (h::low) high t
else assign low (h::high) t
in
asign [] [] rest*)
;; ;;
(* Sort a list l using the merge sort algorithm *) (* Sort a list l using the merge sort algorithm *)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment