Algorithms

In mathematics and computer science, an algorithm is a finite sequence of instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing calculations and data processing. More advanced algorithms can use conditionals to divert the code execution through various routes (referred to as automated decision-making) and deduce valid inferences (referred to as automated reasoning).

Simply put, an algorithm is simply a set of steps used to complete a specific task. They're the building blocks for programming computers.

Examples of algorithms:

  • A navigation app allows you to add a starting location and a destination and provides you directions and the fastest route to get to the destination. The computational steps that it uses to determine what is the fastest route given all the available data (user inputs, data about traffic patterns, data about public transport timings, weather, and so on) is an algorithm, or a series of algorithms.

  • A gaming program changes the complexity of the game, provides you more or less options, determines your score and ranking in comparison with other players, and generally provides a dynamic gaming experience. The computations that it uses to determine all these factors are done by algorithms.