CS 127 Assignments

  1. Assigned 1/3/96, due 1/5/96. Send email to me (my address is "jondich") telling me
  2. Assigned 1/5, due 1/10. Write your own versions of the standard C library functions strlen, strcat, strcmp, and strncpy. Your functions must conform to the descriptions of these functions found in the manual page (type man string at a Unix prompt to see this manual page). Name your functions mystrlen, mystrcat, mystrcmp, and mystrncpy. Hand in only a .c file containing the functions, and a corresponding .h file. Do not hand in a main() function.
  3. Assigned 1/12, due 1/17. Click here for the queues assignment description.
  4. Read sections 4.5, 4.8, 5.1, and 5.2 of the textbook.
  5. Assigned 1/22, due 1/31. Click here for the maze assignment description.
  6. Assigned 2/7, due 2/14. Click here for the word counting assignment description.
  7. Assigned 2/14, due 2/21. Write a routine that heap-sorts an array of integers. Your routine should have prototype

    void heapsort( int num[], int N );

    where num[] is the array to be sorted, and N is the number of integers in that array. This routine should put the sorted integers back in num[].

    Once you have this done, try generating a bunch of random arrays of N integers, and timing your routine for various values of N. For example, you might generate 1000 random arrays of size 100, sort them, timing the process. Then generate another 1000 random arrays of size 1000, sort them, and time the sorting process. Then do 2000, 10000, etc.

    To generate random arrays and time the results, you need some tools. See here and here for examples.

  8. Here is THE FINAL PROJECT. Have fun.




Jeff Ondich, Department of Mathematics and Computer Science, Carleton College, Northfield, MN 55057
(507) 663-4364, jondich@carleton.edu