- Listen carefully: make sure you hear the problem correctly, ask questions about anything yhou’re unsure about. mentally recorded any unique information in the probleml, write down if necessary;
- Draw an example: the example should not be too simple, validate the solution using example and check boundary vlaue**
- state brute force explain what the space and time complexity then drive into imporvents
- Optimize look at unused info? use a fresh example? BUD: Bottlenecks, Unnecessary work, Duplicated work.
- Walk through after you’ve nailed down an optimal algorithm, dont just dive into coding, take a moment to solidify your understanding of the algorithm.
- code if you have more time, do refactor the code e.g.
if i == 1: ... elif i ==2 ...
-> if i in (1, 2):..
- test