Starting from:

$29

Project 1 Quicksort algorithm on lists


Homework Project 1

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.

More products