The world of computing and technology is full of buzzwords. Like, AI, supercomputers, machine learning, cloud computing, quantum computing and many more. But the word algorithm, in particular, is used throughout.
An algorithm is a set of instructions for solving a problem or accomplishing a task.
One close example of an algorithm is a recipe, which consists of specific instructions for preparing a dish or meal. Any person who knows cooking can even prepare a completely new dish by following a recipe. It is the same in the case of the algorithm also. Any programmer can make a computer do anything just by following an algorithm.
Algorithms are generally developed independently of underlying languages, which means that an algorithm can be used in more than one programming language.
For example, an algorithm to add two numbers can be as follows:
Step 1: Start Step 2: Declare variables number1, number2 and sumvalue Step 3: Read values number1 and number2 Step 4: Add number1 and number2 and assign the result to sumvalue sumvalue←number1+number2 Step 5: Display sumvalue Step 6: Stop
As we can see, these instructions are readable and understandable to any person. But to make it readable and understandable for a computer, it has to be implemented into a programming language. That is the job of a programmer.