Asymptotic notations are mathematical tools used to describe the running time of an algorithm as the input size $n$ grows.
- Big O Notation (O): Represents the Worst Case. It provides the maximum time an algorithm will ever take. Most developers focus on this.
- Omega Notation (Omega): Represents the Best Case. It provides the minimum time required.
- Theta Notation (Theta): Represents the Average Case. It provides a tight bound on the execution time.
Common Time Complexities:
- O(1): Constant Time (e.g., Accessing an array index)
- O(n): Linear Time (e.g., A single loop)
- O(n^2): Quadratic Time (e.g., Nested loops/Bubble Sort)