Tips to Solve Programming Problem

These are the tips to solve programming problem.


Nadir Basalamah

3 years ago | 1 min read

There are many ways to learn programming. One of them is by solving many programming problems in online judgement platform like hackerrank or other platforms. These are the tips to solve programming problems.

Define the problem

The first step that can be done is by define the certain problem that will be solved by these ways:

1. Define the goal from the problem. Usually, in a programming problem or exercise there is a specified goal that will be achieved.

2. Take a look at the input and output that is used. Usually, in programming problem or exercise

the input and output constraints are defined.

3. Define the steps to achieve the goal from the problem. If the

the goal, input and output is specified then the steps to achieve the goal from the problem can be defined.

Separate into Many Parts

If the code that written become massively long, some codes can be separated by using functions. Separate many codes with function makes the code become easy to understand and easy to fix or refactoring if necessary.

Start with Small Input

If the solution or code for the problem is finished. Then test the code with the small inputs for example using small integer numbers. If the code works with the small input then test the code with the larger input. If all inputs or test cases are successful then the solution or code can be submitted.

Do some Improvements

If the solution is valid then the next step is to do some improvements in the solution or code that has already been created. The improvements can be done to reduce the time execution of a code or reduce the memory usage.


The last step is by doing some programming practice. The practice can be started from a simple programming problem then continue into the harder problem.

I hope this article is useful. If you have any thoughts let me know in the comments section.


Created by

Nadir Basalamah

A guy who interested in web development and software engineering







Related Articles