What is an algorithm?

What is an algorithm?

Fundamentally all an algorithm is: a process to be followed to accomplish a task.

To put it in simple terms: An algorithm is a set of instructions for solving a logical problem. You can also think of them as recipes where an app is comprised of a bunch of recipes, and some well-known recipes have been given names like bubble sort. You can use someone else's recipe to solve well-known problems you're likely to encounter while coding to help speed up the process vs having to write your own.

In the case of something like Instagram for example the task being accomplished is sharing your content and the algorithm is the process that needs to be followed while sharing that content to millions of people the actual “algorithm” part is: you have your content, it sends it to a certain amount of people then captures some metrics, sends it to more people captures some metrics and as long as those metrics each step performs well it sends it to more people. We can use recipes aka algorithms to accomplish this task by coding the logic to accomplish this task and turn each individual step into code.