McMaster University
CAS 706
Assignment 1
Generic Quicksort. Write 3 different versions of
quicksort (in each language), which explicitly:
- Sort a list of integers in ascending order
- Sorts a list of ``anything'' via an externally provided
comparison function.
- Sorts a list of ``anything'' via an externally provided
comparison function, and an externally provided partition
function (which itself uses the comparison function).
Your code should also contain executable test cases for
each.
For the compilers/interpreters:
- D: recommended is dmd 2.0, available from
dlang.org.
- Ruby: there are
different instructions
depending on your platform.
- Ocaml: instructions
for all platforms.
- Prolog: I recommend SWI-prolog
(which is also installed on mills).
Note that for a number of these languages, your package manager (on Linux
or Mac) might allow you to install things even more easily.
Sept. 2014