Computer ScienceAlgorithmsEasy

Algorithm

Also known as:ProcedureRoutineMethod

An algorithm is a finite, ordered sequence of well-defined instructions or rules designed to solve a specific problem or accomplish a task. Algorithms are fundamental to computer science because they provide a systematic approach to computation, independent of any particular programming language or hardware. They are evaluated on correctness, efficiency, and clarity, and form the basis of every software program ever written.

Properties of a Well-Defined Algorithm

PropertyDescriptionExample
InputZero or more inputs are acceptedA list of numbers to sort
OutputAt least one output is producedThe sorted list
DefinitenessEach step is precisely definedSwap elements if A > B
FinitenessTerminates after a finite number of stepsStops after n passes
EffectivenessEach step is basic enough to be carried outSimple comparisons and swaps

Interactive Tools

VisuAlgo

Animated algorithm visualizations

Open Tool

Khan Academy – Algorithms

Introductory algorithm lessons

Open Tool

Brilliant.org

Interactive algorithm problem-solving

Open Tool
Animated comparison of multiple sorting algorithms

Wikimedia Commons, CC BY-SA

Related Terms

Derived from the name of the 9th-century Persian mathematician Muhammad ibn Musa al-Khwarizmi. His Latinised name "Algoritmi" gave rise to the word "algorithm". The term was popularised in its modern computational sense in the 20th century.

algorithmcomputationproblem-solvingcomputer-sciencelogic