Confirm the Question:
- Repeat the question back
- Input values
- Input sizes
- Example input/output
Algorithm Design:
- Come up with a brute force solution
- Come up with intuitive optimal solution
- Clearly explain algorithm (with example if need be)
- Pseudocode
Complexity Analysis:
- Correct time complexity
- Explain time complexity
- Correct space complexity
- Explain space complexity
- (Bonus): Provide complexity analysis for brute force
Coding:
-
Write main steps in comment before coding (placement of pseudocode)
-
Explain each line verbally before writing
Reminders:
- reduce glaring errors
- donβt go silent
- donβt take a long time
- demonstrate knowledge of language where possible
Testing:
- Test both the code and algorithm
- Re-use test case created or provided in algorithm design section
- Come up with another test case that mentions edge cases