Assignment 2: mysort

Date: February 1st 2017
Deadline:February 22nd 2017 23:59

Objectives

You must implement a list API and a multi-tool number sorting program.

Requirements

Your sorting program must be named mysort and its basic operation is as follows:

Numbers in the input are separated by white space. Your program must perform sorting by maintaining a sorted list in memory and maintaining this order while reading the input (insertion sort).

You must submit your work as a tarball [1]. Next to the source code, your archive must contain a text file file named “AUTHORS” containing your name and Student ID.

[1]http://lmgtfy.com/?q=how+to+make+a+tarball

Getting started

  1. Unpack the provided source code archive; then run make.

  2. Try out the generated mysort and familiarize yourself with its interface.

  3. Read the file list.h and understand the interface.

  4. Implement the data structure in list.c.

  5. Implement the input and insertion sort algorithm in main.c.

    You can use e.g. du ~ | awk '{print $1}' | ./mysort to test your work.

Grading

Your grade starts from 0, and the following tests determine your grade:

The following extra features will be tested to obtain higher grades, but only if you have obtained a minimum of 5 points on the list above already:

See also