Problem Solving Approach 🧩

By Mayara Saldanha

I’ve been studying more about algorithms lately, as they are a fundamental part of programming and data analytics, and I noticed that when we start practicing with code challenges, it’s easy to get stuck at a particular part of the task. Depending on the complexity level, sometimes we don’t even know from where or how to start doing it at all.

To help on this process, I’d like to share 3 basic steps that have helped me to approach problem solving:

🤔 Understand the problem: when reading the code challenge, first understand what the problem is, before thinking about solving it. It’s a good idea to rephrase it with our own words.

📚 Break it down: after understanding what the problem is, it’s a good idea to break it into small tasks and start solving it one by one, before merging all together. This way, if it’s a very complicated problem, you minimize the chances of being stuck in the beginning of it.

⚙️ Refactor it: many times when solving a code challenge we want to come up with the best (more effective, more clean, etc.) solution right away, and we end up not even starting because we got lost in the process. A better approach, although, would be starting it the way we know at the moment (a simplified version), and after getting it working, coming back to it and refactoring. Some things we can ask ourselves in this moment are: what are other ways that I can solve this problem? What are other examples I can look at to learn of better ways to approach this?

For me, as a beginner, I’ve found these steps very useful to improve my learning process and to avoid getting paralyzed when not coming up with a complete solution at first. I hope it can be valuable for others too!

Ps. this problem solving approach can be used for many more things other than programming 😉

Images by Freeimages.com and Freepik.com

Share: LinkedIn