Starting from:
$30

$24

Homework Project #1 Solution

Implement the quicksort algorithm on lists. You write one function struct listnode * sort(struct listnode * a);




with




struct listnode { struct listnode * next; int key;};




It takes a list, and returns the list in sorted sequence. You change only pointers, do not allocate new nodes or move key values to different nodes. The programming language is C or C++; test your code before submission using the gcc or g++ compiler. Please remove all dead code; try to program as clearly as possible, since I try to read it. Your function for this should be less than fifty lines of code long. Do not copy code from another student or from the web; this is an easy project, and must be all your own work. Submit your source code by e-mail to phjmbrass@gmail.com; include the course




and homework number in the subject line, and your name as a comment in the homework file.

More products