- Listen - usually all of the information in the question is useful.
- Example - make examples larger, avoid special cases.
- Brute force - better to have brute force than nothing at all, don’t necessarily code it, maybe just state the runtime.
- Walk through your algorithm.
- Test - use small test cases, then edge cases.
- Analyse and optimise - check for loops, maths, walk through the code, not the algorithm.
- Use straight lines
- Start top left
- Leave space to insert lines of code
- Modularise up front (use a function that you haven’t yet written)
- Unnecessary work
- Duplicated work
Space / time tradeoffs
Consider saving time by using extra space (often hash tables).