Algorithm

If problem solving is a central part of computer science, then the solutions that you create through the problem solving process are also important. In computer science, we refer to these solutions as algorithms. An algorithm is a step by step list of instructions that if followed exactly will solve the problem under consideration.

An algorithm is the list of instructions and rules that a computer needs to do to complete a task.
Algorithms are in everything we do. But for those that aren’t inclined toward maths and programming, the term ‘algorithm’ is less than clear. (In fact, the joke runs that developers use the word ‘algorithm’ when they don’t want to explain what they’ve done.) So, you might have heard the term before, even used it. But what is an algorithm exactly?

How do computer algorithms work?

Computer algorithms work via input and output. They take the input and apply each step of the algorithm to that information to generate an output. For example, a search engine is an algorithm that takes a search query as an input and searches its database for items relevant to the words in the query. It then outputs the results. You can easily visualise algorithms as a flowchart. The input leads to steps and questions that need handling in order. When each section of the flowchart is completed, the generated result is the output.

Algorithm
Algorithm