Overview


Big-O is the notation we'll learn for "algorithm time complexity analysis" (this sounds more complex than it actually is).

Note that term "time" can be misleading here -- Big-O does not measure or estimate time.

Note we'll learn about the sister concept of "algorithm space complexity analysis" later.

Essence


What is the essence of Big-O?

Empty Structure
We start off with an empty structure. The structure could be any type -- e.g. dynamic array, linked list, binary tree, etc.
Grow a Little
We pretend to grow the structure size to five elements.
Grow More!
We pretend to grow the structure size to one thousand elements.
Grow Towards Infinity
Finally, we pretend to grow the structure size towards an infinite number of elements.
The Essence of Big-O
Big-O is about answering the question:

Does a given algorithm work harder as structure size grows?
🔨 👷🏿‍♀