Department of Computer Science University of San Francisco


Computer Science 245-01
Data Structures and Algorithms
Spring 2005

MW 3:30-5:15 HR 235


Professor: Peter Pacheco
Office: Harney 540
Phone: 422-6630
Email: peter@usfca.edu
Office Hours: MW 5:30-7:00 and by appointment

TA: Anna Tikhonova
Email: atikhono@cs.usfca.edu

Course Syllabus

Information on the Final Exam

Homework Assignments

  1. Assignment 1. Due Monday, Jan 31 at the beginning of class
  2. Assignment 2. Due Monday, Feb 7. Add the dummy header to the linked list class StudentDB.java.ll and modify the methods so that the constructor, insertStudent, member, getStudent, and printDB all work correctly.
  3. Assignment 3. Due Monday, Feb 14. Modify StudentDB.java.ll2 so that it uses a doubly-linked list instead of a singly-linked list.
  4. Assignment 4. Due Wednesday, Feb 23, Modify TohStack.java so that it uses an array instead of a linked list. The other classes in the program are TohI.java and TohNode.java.
  5. Assignment 5. Due Monday, March 7. Use this code to study the average heights of binary search trees. Write a main method (and any other methods you need) so that the code finds the average height of binary search trees with a given number n of keys. The average should be taken over all possible permutations of the keys 0, 1, . . . , n-1. What's the largest number of keys that your program can handle?
  6. Assignment 6. Due Wednesday, March 30. Here's a key to assignment 6.
  7. Assignment 7. Due Monday, April 11. Here's a key to assignment 7.
  8. Assignment 8. Due Monday, April 18. Here's a key to assignment 8.
  9. Assignment 9. Due Monday, April 25. Here's a key to assignment 9.
  10. Assignment 10. Due Monday, May 9. Use the implementations of sorting algorithms from class.

    Note that the code segment in 8.10b should read

             for (i = 0; i < L.length; i++)
                qsort(L, i, L.length-1);
       
    Here's a key.

Programming Assignments

  1. Programming Assignment 1
  2. Programming Assignment 2
  3. Programming Assignment 3. Here are some definitions and algorithms.
  4. Programming Assignment 4

Additional Information



Peter Pacheco 2005-05-12