Solving programming problems - 401-advanced-javascript-billybunn/seattle-javascript-401d29 GitHub Wiki
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)
- Read the problem completely, 2 to 4 times. Understand the problem entirely and work through any examples given.
- Solve the problem manually. Solve the problem step-by-step for at least 3 different inputs.
- Optimize the manual solution. Look for any duplicate steps in the manual solution and re-write it with fewer steps.
- Write out pseudo code. Write short sentences as placeholders for actual code that describe what the code will do there.
- Replace pseudo code with real code. (This should be quick.)
- Optimize your real code. Look for places you can make it more DRY.