Assignments will be collected at the beginning of the class period. Please bring a hardcopy to turn in. Your assignment can be hand-written or typed.
For the questions on the homework that ask you to "design an algorithm", your answer should include the following:
- Description: A written description of how your algorithm works (at least one paragraph)
- Pseudocode: Pseudocode for your algorithm. The pseudocode should give sufficient detail to make an analysis straightforward (e.g. don't hide a for-loop in an English phrase) while still being high-level enough that it can be easily read.
- Running Time: Each of the questions specifies a running time. State the recurrence relation for your pseudocode and then use either a recurrence tree or the substitution method to justify the running time of your method.
|