Lesson 1: What is an algorithm (and why speed matters)
Welcome! Before we talk about clever algorithms, let's start with the most basic question: what even is an algorithm? An algorithm is simply a clear list of steps that leads to a result — just like a cooking recipe. We'll look at one tiny example (how to find the largest number in a list) and see wh
An algorithm is a recipe: a sequence of simple steps that, done in order, gets you a result. 'Find the largest' is a tiny recipe: go over the numbers one by one and remember the biggest you've seen so far.
- algorithm
- A clear, precise list of steps that solves a problem or reaches a goal — like a recipe.
- list
- A collection of items in some order, e.g. a collection of numbers: [3, 9, 2].
- loop
- Repeating the same action for each item in a collection — going over them one by one.