ReviseAlgo Logo
EasyVery High Frequency15 min

Big O Notation

Understand how to analyze the efficiency of algorithms using asymptotic notation.

Big O describes how an algorithm scales as input grows. Focus on the growth pattern, not exact runtime.

Big O Notation

Common Data Structure Operations

Operation
Time
Note
Array access
O(1)
Direct index lookup
Linear search
O(n)
Scan all elements in the worst case
Binary search
O(log n)
Requires sorted input
Comparison sort
O(n log n)
Merge sort, heap sort