Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 1.12 KB

problem-solving.md

File metadata and controls

13 lines (12 loc) · 1.12 KB

Algorithm Problem Solving

  1. Start with the naive solution. It shows you understand the problem.
  2. Think out loud, even if it's quiet. It lets the interviewer help out if you get stuck.
  3. Write your own test cases. Write at least 3 test cases to show you understand the problem.
  4. Outline your algorithm on the IDE. It makes it easier for everyone to follow along.
  5. Refer back to each step of your algorithm as you're coding. This shows you can walk the walk.
  6. Dry run your code line by line against your test cases. Dont wait for the interviewer to ask you to do it.
  7. Offer to optimize the algorithm. Point out the bottleneck first then explain what you need to do differently.
  8. Solve for the running time. Solve it throughout your code then explain your nested for loop makes it O(n^2)
  9. Use good variable names. Thing1 and thing2 aren't good things to write.
  10. Abstract functions away. Don't spend the entire interview on a parsing function that isn't important to the algorithm
  11. Do it for the interviewer. Keep checking in with the interviewer if they understand what's going on or if you need to walk them through your ideas.