Lesson
Complexity of Operations
Big-O notation describes how an operation's cost grows with input size $n$. Constant time $O(1)$ does not depend on $n$; linear time $O(n)$ grows in proportion; logarithmic time $O(\\log n)$ grows very slowly.
Practice
Choosing the right data structure changes an operation's complexity. The table of common operations is worth committing to memory.
Quiz