All lessons in Software Engineering: Programs, Systems, and Maintainable Software
Algorithm Lab: Implement and Explain
Implement search and traversal, test boundary cases, and defend time and space costs.
75 minutes · Members lesson · preview
What you will learn
- Implement search and traversal against explicit behavioral contracts.
- Use counterexamples and independent oracles to test correctness.
- Explain implementation costs and limits using evidence from the code.
This is the first required implementation activity. You will implement two algorithms, investigate one deliberate defect, and submit a short explanation of correctness and cost. Passing a small list of examples is useful evidence, but the goal is also to explain why the implementation handles the entire stated input domain.
Use any language you can test locally. The reference workbook supplies Python implementations and executable checks for comparison. Attempt the exercises before reading the reference functions. The specifications and expected reasoning are included here so the download is optional.