Introduction
Big O, Big Theta (Θ) and Big Omega (Ω) Notation are mathematical concept which is used to describe the performance of an algorithm in terms of time and space complexity. These Notations are helpful to Understand the upper average and lower Bounds of an algorithm’s performance.
Bog O Notation (O)
Big O Notation is used for describes the upper bound of an algorithm’s running time. It gives the Worst-case scenario, ensuring the algorithm won’t take longer than time as the input size grows.
- Worst-Case Scenario: – The Target element is at the end of the list or not present. The time complexity is O(n), where n is the number of elements.
Bog Theta (Θ) Notation
Big Θ Notation provides a tight bound on the running time of an algorithm. It is present in both upper and lower bounds, giving the exact growth rate.
- Time Complexity: – The time complexity is Θ (n log n) for all cases (best, average and worst), where n is the number of elements,
Big Omega (Ω) Notation
Big Ω Notation is used for describes the lower bound of an algorithm’s in running time. It gives the Best-case Scenario, indicating the minimum time an algorithm will take as the input size grows.
- Best-Case Scenario: – The Time complexity is Ω(1).
Graph
Here is the Graph,
In The Graph,
- First, Big O (O):- This Represents the Highest Curve, which is showing the Worst-Case Upper Bound.
- Second, Big Θ (Θ): – is the middle curve which is showing the Exact bound.
- Third, Big Ω (Ω):- It is the lowest curve Which shows the Best-Case Lower Bound.