CS 2420-20 Homework 6

Due: Monday, February 7th, 2011 9:10am

There is no starting code for this assignment.

Part 1 – Mergesort

Implement and test a mergesort function on arrays of ints in C. The mergesort function should allocate a new array for the result, and it should not change the given array.

Optionally, read numbers from stdin and write the sorted numbers back out to sdout.

Handin your program as mergesort.c.

Part 2 – Quicksort

Implement and test a quicksort function on arrays of ints in C. The function should modify the given array in place, instead of allocating a new array.

Optionally, read numbers from stdin and write the sorted numbers back out to sdout.

Handin your program as quicksort.c.


Last update: Thursday, April 7th, 2011
mflatt@cs.utah.edu