Computer Science · Cheatsheet
Topic 4 · Abstract Data Structures (HL)
Chapter 3 · Algorithm efficiency
📋 Reference · always available
Big-O
O(1) < O(log n) < O(n) < O(n log n) < O(n²).
Linear search
O(n); any list.
Binary search
O(log n); SORTED list only — halves each step.
Bubble sort
O(n²); swaps adjacent pairs, largest bubbles to the end.