Big O Notation
What is Big O Notation
Big O notation describes the efficiency of an algorithm.
Common Complexities
- O(1) Constant Time: Execution time is the same regardless of the input size.
- O(log n) Logarithmic: The execution time increases logarithmically as the input size grows.
O(1) Example
arr = [1, 2, 3, 4] print(arr[2])