Interview coding tests

  1. Listen: usually all the information in the question is useful
  2. Example: make examples larger, avoid special cases
  3. Brute force: better to have brute force than nothing at all; don't necessarily code it, maybe just state the runtime
  4. Optimise
  5. Walk through your algorithm
  6. Code
  7. Test: use small test cases, then edge cases
  8. 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)


  • Bottlenecks
  • Unnecessary work
  • Duplicated work

Space / time tradeoffs

  • Consider saving time by using extra space (often hash tables)

results matching ""

    No results matching ""