What is an Algorithm

Essentially an algorithm is a set of instructions that are required to accomplish something. It’s a term that is quite common in computer software.

You can imagine it as a cooking recipe. It contains a list of ingredients that you need to create a delicious dish. Similarly, an algorithm contains a list of things that the computer needs to do to get a task done. That could be something as simple as sorting a list of numbers or something as complex as generating a maze for a video game.

An algorithm can be represented in various forms. One such option is by directly writing code using a programming language. But since an algorithm by itself is not supposed to be tied to a language, it’s commonly written using pseudo code or a flowchart and then implemented using a language.

Here are a few examples of widely used algorithms: