how to solve the coding problem in 4 steps faster?

You are going to run into the coding problem several times a day depending on the project you are working on.

Certainly in:

  • ➡️ Your technical interviews.
  • ➡️ Customer projects.
  • ➡️ Your projects.

This is to demonstrate:

  • ➡️ Your problem-solving skills.
  • ➡️ And your thinking process.

Assuming you have 45 minutes, without anything ie on a whiteboard I offer you 4 Strategic Steps that I found on a post by Sophia Li, an American developer from San Francisco, on her original post **

In 45 minutes you therefore need:

  • ➡️ Understand;
  • ➡️ Solve;
  • ➡️ Code;
  • ➡️ And examine.

Understand the problem in 5 minutes

  • ➡️ Read the problem.
  • ➡️ Clarify with your interlocutor if there are parts that you do not understand.
  • ➡️ Repeat the problem in your own words to check your general understanding.
  • ➡️ Validate your assumptions with the interviewer to make sure your approach is correct.


Problem-solving in 10 minutes

Before writing any code, you will define a strategy to solve the problem Here are some problem-solving strategies:

Separate to better understand (Divide to reign better)

Break down the problem into smaller sub-problems (or even sub-sub-problems) and solve them separately.

Repeat the naive approach (Iterate the easy approach)

The first solution found may not be the optimal solution.

If you are aware that your first solution will not be optimized for the complexity of time and space, you must frame your work by saying: “The naive approach would be If you have more time, in the end, repeat your naive solution.

Data structures and correspondence of algorithm models

There are several basic data structures that any good developer. the basics Some examples are sets, dictionaries, and maps. Elementary programming Browse the common data structures and algorithms used to code in certain situations to see if they apply to your problem.

Write the pseudocode (An easy algorithm)

Pseudocode is considered to be an informal, high-level (easy to read) description of what an algorithm or program does.

Your grades will be serious indicators to put you on the right path when you start your code. I read somewhere that take note to listen twice.

  1. Code in 20 minutes

Before coding:

First, get to know your coding environment. The test is done on how to run your code. Fast training!

Indicate precisely if you will need to use libraries, frameworks, and search for library constructs. Everything you need to code quietly.

While your code:

Explain aloud what you are doing while coding. When you explain your thought process, the other person can intervene if they closely follow what you are trying to do. Investigators try to help you prepare for success!

Informally test your code early on and every step of the way to avoid a tricky debugging session at the end of your interview.

Stay focused by referring to your notes from step 2 ” problem solving ” throughout the coding process.

  1. Examine everything in 5 minutes
  • Test: Review your test case and make sure important cases are handled correctly.
  • Optimize: Find ways to optimize your code for speed and memory.
  • Clean-Up: Refactor (arrange) your code to tidy up and improve your code structure.


Knowing how to solve the coding problem without anything in front of a whiteboard in 45 minutes is an essential skill to better master the process of thinking until the final result. Practice again!

A skill that will be useful to you in:

  • ➡️ Your technical interviews.
  • ➡️ Customer projects.
  • ➡️ Your projects.
  • ➡️ Your explanations of practical technologies to one or more people.

I am inspired by this to explain, what I am doing or going to do to a client or an apprentice.


Please enter your comment!
Please enter your name here