How should I approach to solve any coding problem? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How should I approach to solve any coding problem?

I tried to solve many question but always get stuck & get frustated.

24th Jul 2020, 5:37 PM
Sarfira
Sarfira - avatar
5 Answers
+ 4
Peace☯ Try to break up the problem into small parts. For example: Let's assume you want to write a program that accepts username and outputs a greeting with the name. The steps might go something like: -> Accept input -> Convert input to title case -> Add a greeting and concatenate with the name. -> Print output. Simple example but...a complex problem can be made very elementary by breaking it into simple steps. Hope this helps 😃😃
24th Jul 2020, 5:49 PM
Tomiwa Joseph
Tomiwa Joseph - avatar
+ 2
Peace☯ It works wonder. This way when you get to a stage where you are stuck, you Google stuff out like Mirielle rightly stated. Most of the answers are already out there anyway😄😄
24th Jul 2020, 6:02 PM
Tomiwa Joseph
Tomiwa Joseph - avatar
+ 1
Tomiwa Joseph yup I also agree best way solve any problem by breaking into many steps.
24th Jul 2020, 5:58 PM
Sarfira
Sarfira - avatar
+ 1
Peace☯ Solving by using a different method is fine as long as your solution doesn't take too long to execute and it is simple enough to understand.
24th Jul 2020, 5:59 PM
Pratyush Vatsa
Pratyush Vatsa - avatar
+ 1
Mathematical approach is fine for solution but can't help you to understand in what are steps need to be taken to solve it.
24th Jul 2020, 6:15 PM
Sarfira
Sarfira - avatar