Algorithms and the Need For Analysis In Programming languages

Understand the concepts of computer science

Amit Chauhan
The Pythoneers

--

Photo by Fotis Fotopoulos on Unsplash

Introduction

Algorithms play an essential role in understanding the concepts of computer science. Mostly we learn by seeing others solve the problem and then by trying to solve it on our own. The algorithm helps us understand the task at our hand better by breaking them into a finite number of steps and arranging them in the required order.

Hence, the algorithm combines sequences of a finite number of steps to solve a problem. Infinite steps would take endless time, giving us no proper solution, and thus it should always be a limited number of steps.

Along with the finiteness, there are some more aspects that one must keep in mind while writing an algorithm.

Properties of Algorithm

  • It should terminate within a finite time. It is crucial to remember that finite steps do not always imply finite time. Forex: while (1)
print(“hi”)

Even though it consists of just two steps, it will get into an infinite loop, taking endless time.

  • Every statement in an algorithm should be effective (i.e., each statement is supposed to do some work)

--

--