DEV Community

Cover image for How to solve programming problems:
Jayesh Dineshbhai Pansuriya
Jayesh Dineshbhai Pansuriya

Posted on

How to solve programming problems:

Hii!! I am Jayesh Pansuriya (CEO) from JD Infotech Ltd.
For Beginner's level programming problems Solving I think the following Tips works best.

Use a pen and paper to work out solutions.
The logic / algorithm first has to be clear in your mind before you decide to code it out.
Don't spend more than 30 minutes on any problem. While the objective is to learn - if you don't know the approach, it's best to learn the concept / review the solution.

Step 1: Understand the problem statement and the sample test cases
Step 2: Generate examples - Create 10 input and output cases of your own
Step 3: Observations / Pattern - Observe your examples to identify the logic
Step 4: Plan your code - Modularise and solve sub-components of your problem
Step 5: Learn - You may come across components of you logic where you don't know how to execute the code.
In such cases, ask Google or ChatGPT or your friends and learn!
Step 6: Write the code - For simpler programming problems - Java solutions will be less than 20 lines in more than 95% of the cases.
Step 7: Identify edge cases - If your code still fails - try and and come up with corner cases where your code may fail.

Every Expert Wae Once a Bigginer!!!
Best Of Luck!
Kepp Learning & Kepp Coding!!

Email: jdinfotech2019@gmail.com

Top comments (0)