Big O Notation
Big O Notation classifies algorithms by their speed.
What is Big O Notation? ⏱️
Big O Notation classifies types of algorithms by there speed. Big O Notation is used to determine how long an algorithm will take to complete.

Seconds or Years?⏲️
The point of Big O Notation is to give the user an idea of how fast or slow an algorithm will take to complete.
Seconds? ⏲️
Minutes? ⏳ ⌛
Hours? 🕓
Days? 🌞🌚
Years? 🥳 🎂
Centuries? 👶 ⚰️
Millennia? 🗿
Eons? ♾️
Math without the Math 🤔
Big O Notation works by approximating the total amount of steps an algorithm will take. lets create a list of the numbers 1 through 100 and classify different algorithms by their speed.
Array = [1,2,3..99,100]
O(1)🚀
Fastest completion time possible
Fixed amount of steps
Example: 1 + 100
2 steps
O(log(N)) 🏎️
Fast Completion Time
The steps are a small fraction(log) of the size of the data
Example: 0 + 75 + 88 + 94 + 97 + 99
6 steps
O(N) 🏇
Completion time is okay
Steps are the size of the data
Example: 1+2+3+4+5...100
100 steps
O(N^2) 🐌
Completion time is slow
Steps are size of the data squared
Example: [1+2+3..100] + [2+3+4..100] + [3+4+5..100]...
5050 steps
♾️Important to note as the size of the data grows, run times can approach infinity ♾️
Last updated
Was this helpful?