Solve It

Josh M.R. Allen
2 min readDec 21, 2020

Problem solving is a process. It’s easy to forget that in order to solve a problem, you need to actually focus on solving the problem.

I’ve been using a Udemy course by an instructor named Colt Steele, called JavaScript Algorithms and Data Structures Masterclass. In this course, Colt has an entire section devoted to Problem Solving and lays out actionable steps.

At first, I just made quick notes and moved on as quickly as possible. However, as I progressed in my endeavor to practice problems for tech interviews, I realized I had a problem. Or rather, it took a good friend of mine to point out that I had a problem.

The problem was that I kept jumping into the code the second I thought of something that might work. It’s one thing to move fast and break things, but it’s quite another thing to move fast and create more confusion for yourself, resulting in hours and hours of staring at the problem in question.

Here are Colt’s steps, many of which he used the book, How to Solve It, by George Pólya:

Summary of Steps:

  1. Understand the problem.
  2. Explore concrete examples.
  3. Break the process down into an actionable list.
  4. Solve or Simplify and Solve.
  5. Refactor.

What I did to follow the steps consistently:

  1. I wrote each step down on separate pieces of paper and arranged them like a pyramid above my work area on the wall.
  2. I practiced not jumping into code at first inclination. Thanks to a good friend, I realized my biggest weakness was my tendency to jump into the code without getting my logic down first.
  3. I practiced “exploring concrete examples” visually. You can do this with a whiteboard, a piece of paper, or your comments. What Colt means in his course is literally display for yourself what’s happening. Write out the algorithm and “step through it”, manually moving pointers, etc. If you don’t have a whiteboard, a mirror will do fine. If you don’t have dry erase markers, lipstick or ketchup is a perfect alternative.

Resources and Acknowledgements

My friend Sonya

Colt Steele, Udemy Instructor

How to Solve It, by George Pólya

--

--

Josh M.R. Allen

Crazy cool like a mouth full of 花椒 (Sichuan peppers)! Software Engineer | Rails | React | JavaScript | Ruby | AWS S3 | Proud father of a precocious explorer.