Repaso
EspaƱol
Algorithms & DSFoundationsALG-50

What is an algorithm?

Options

  1. A step-by-step procedure for solving a problem (Correct option)
  2. A programming language used to write programs
  3. A type of database used to store records
  4. A kind of computer chip used in servers

Answer

A step-by-step procedure for solving a problem or doing a task

Why

An algorithm is a clear list of steps that always leads to a result. A cooking recipe is a good picture.

Example: 'find the largest number in a list' = look at each number and remember the biggest seen so far.

The same problem can have several algorithms; some are much faster than others, which is why we study complexity (Big-O).

Remember

Algorithm = a recipe for solving a problem.

Key terms

Practice this question in Repaso