Notes
Saved
Today · 3 min readuni
Big O notation recap for the exam on Thursday. Focus on understanding the intuition behind each complexity class rather than memorizing.
O(1) — Constant. Hash table lookup, array access by index.
O(log n) — Logarithmic. Binary search, balanced BST.
O(n log n) — Merge sort, heap sort.
O(n²) — Bubble sort, selection sort. Avoid for large inputs.