Fiveable
Fiveable

Algorithm

Definition

An algorithm is a step-by-step procedure or set of rules for solving a specific problem or accomplishing a task within a finite number of steps.

Analogy

Imagine following a recipe when baking cookies. The recipe provides you with precise instructions on what ingredients to use and how long to bake them. Similarly, an algorithm provides a set of instructions for a computer to follow in order to solve a problem.

Related terms

Pseudocode: Pseudocode is a simplified programming language that allows programmers to express algorithms without worrying about specific syntax.

Flowchart: A flowchart is a graphical representation of an algorithm using various shapes and arrows to depict the sequence of steps.

Efficiency: Efficiency refers to how well an algorithm utilizes resources such as time and memory. An efficient algorithm completes its task quickly and with minimal resource usage.



© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.