Knowledge Card - Big O Complexities
Big O Complexities
- O(1): Constant time (e.g., accessing an array element).
- O(n): Linear time (e.g., traversing a list).
- O(n²): Quadratic time (e.g., nested loops).
- O(log n): Logarithmic time (e.g., binary search).
- O(n log n): Common in efficient sorting algorithms (e.g., merge sort, quicksort).