Simple Definition:
An algorithm is a step-by-step procedure [a series of actions performed in a certain order] or set of rules [instructions to follow] to solve a problem or accomplish a specific task. Often, a computer also follows an algorithm, the same way you can follow a recipe or a set of instructions.
Examples:
- In computer science, algorithms are used to sort lists of numbers or data in a specific order, like arranging them from smallest to largest.
- If you need to find the square root of a number, you can use the algorithm known as the Babylonian method. It involves making guesses and refining them until you reach an accurate approximation.
Very Simple Definition:
An algorithm is a set of rules or instructions that tell you how to do something. Often, a computer also follows an algorithm, the same way you can follow a recipe.
Examples:
- To solve a Rubik’s Cube (a type of puzzle) you can follow certain procedures (algorithms) that move the pieces into the correct place.
- A calculator follows an algorithm (set of instructions given to it) to find the square root of a number.