Skip to content

Solving programming problems

Billy Bunn edited this page Mar 17, 2019 · 1 revision

A summary of How To Solve Programming Problems by John Sonmez.

Purpose

Solving programming problems is a major part of a technical interview for developer positions. Organizing your thoughts and attacking these problems with a prepared strategy is key. Below is an step-by-step strategy for such problems.

Summary

(Steps 1–3 should take up 70% of your total time)

  1. Read the problem completely, 2 to 4 times. Understand the problem entirely and work through any examples given.
  2. Solve the problem manually. Solve the problem step-by-step for at least 3 different inputs.
  3. Optimize the manual solution. Look for any duplicate steps in the manual solution and re-write it with fewer steps.
  4. Write out pseudo code. Write short sentences as placeholders for actual code that describe what the code will do there.
  5. Replace pseudo code with real code. (This should be quick.)
  6. Optimize your real code. Look for places you can make it more DRY.