ART OF SOLVING COMPLEX PROBLEMS WITH THE HELP OF ALGORITHMS

Prakhar singh
3 min readMar 29, 2023

--

So as you all have started coding with us and there were some new ones who recently started their journey in coding. So coding is like a roller coaster ride where you have some fun you have some fear, now the fun comes when you successfully write the code and get your imagined output. But there are some problems in which you might stuck and as a self-learner you should know how to tackle these problems

So if you solve a problem you should solve it by breaking into steps now what that means? Don’t worry I’ll help you with that Let us consider the example of a program which when executed would enable the user to enter two numbers, add them and display the result. So it is clear that this program would contain three sets of instructions

1.Enable the users to input the data

2.Add the numbers

3.Display the results

So this is how a programmer would have planned these three steps and used statements within it to implement each of

them. The example we have considered is extremely simple However the problems which a computer is supposed to solve would be more complex. Don’t worry remember the roller coaster ride there will be more fun so just buckle up your seat belt and boom lets go and see how we can solve these complex problems and become a pro programmer So as we discussed these complex problems require complex solutions.

Now what is complex solutions?

So these complex solutions involve a lot of complex arithmetic operations and logical decision making in simple words Algorithms would help you to do that and the most important thing is need of the hour here is a tool which will enable all of you to represent the logic required in the program and make it possible to transform the logic to an equivalent set of instructions and when you execute it boom you solved the problem.

Let me make it simple for you by defining what is algorithm and flowcharts

Algorithms: — So when you try to run a program on a computer then you have to tell the computer, step by step, exactly what you want it to do. The computer will execute the following steps, to accomplish the end goal. When you are telling the computer what to do, you also get to know how it’s going to do it. That’s where computer algorithms come in. The algorithm is the basic technique through which you can solve problems by breaking them into steps. Let’s make it more clear with the example

Develop an algorithm to find the average of 3 numbers taken as input from the user

1. Start

2. Input First number into variable A

3. Input second number into variable B

4. Input third number into variable C

5. Compute Sum = A+B+C

6. Compute Avg = Sum/3

7. Display Avg

8. End

Yohoo!! We have solved a program with the help of algorithms this is just an example try to solve some of the problems by your own as I told you need of hours and practice is a tool

I hope I have given you a basic idea how you can solve the problems with the help of algorithms there are some more secret tools(Top Secret) through which you can solve more problems easily I’ll share those tools with you in my upcoming blogs

-Prakhar Singh

--

--