CMSC 246 Systems Programming
Spring 2018


Assignment#4
Due in Class on Monday, February 19, 2018

  1. Implementing Quicksort

    Pages 207-209, Chapter 9, of King's book provide an implementation of the Quicksort algorithm. Study the algorithm carefully and then implement it in your program from Assignment 3. That is, in addition to using Insertion Sort, you program will also now, take a shuffled array, sort it using the Quicksort function, and print out the contents (along with an check of whether it is sorted or not).

Scripting in Linux
Once done, you will need to show the sample runs of programs, as required above. In order to record the runs, you can use the Linux command script.
Go to your Assignment directory and enter the command: script session

You will get your command prompt back. Next, run each of the above programs as you normally would. Once done, enter the command: exit (or CTRL-D)

This will end your script session. If you now look a the contents of the session file, you will see that the entire interaction has been recorded in it (as a script!).

What to hand in:

Back to CMSC246 Home page