ECE 198
Homework 1
Due Early Week 2, On-Time Week 3
Last modified: 4/5/2002
- Early submission will earn you 10 points bonus on top of 100 points. On-Time submission earns you up to 100 points.
- Always write the time-complexity (in Big Oh notation) in a comment next to every method or function you write in this class.
- For a program timer class, see src/PCTimer.h for Win32-family OS and see src/Timer.h for Unix-family OS.
- For test input use the file src/words.txt, which contains 45,000 words from the Unix dictionary.
- (30 points) Write class ArrayList as presented in lecture.
- (30 points) Write class LinkedList as presented in lecture.
- (40 points) Write a driver program that allows the user to test two implementations of the unordered list data structures: ArrayList and LinkedList. Your driver should use the provided PCTimer class to measure the following times
- the total time needed to insert all words from the test input file.
- the total time needed to find all every word from the test input file.
- the total time needed to remove all words given in the test input file.
- What to submit:
- Show your TA that both data structures work as described above.
- Submit (and save) your times for each data structure. We will build a comparison table for a final project at the end of the course.