Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
uva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
uva
Commits
c80e4c4c
Commit
c80e4c4c
authored
Nov 27, 2011
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
funclang series4: Removed unused commented code from quickSort.
parent
e256c17d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
11 deletions
+0
-11
funclang-taddeus/series4/ass8.ml
funclang-taddeus/series4/ass8.ml
+0
-11
No files found.
funclang-taddeus/series4/ass8.ml
View file @
c80e4c4c
...
@@ -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 *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment