While trying to understand the difference between Theta and O notation I came across the following statement :
The Theta-no
In very simple language difference would be like this:
Big O notation is used for the worst case analysis of an algorithm. Big Omega is used for the best case analysis of an algorithm. Big Theta is used for the analysis of an algorithm when the the best case and worst case analysis is the same.
Let's say you are looking for a number in a sorted array using binary search algorithm.
[1 2 3 4 5 6 7]
In the worst case , such as when the target is 1 it has to perform log(n) split checks, which is log(7) in our case. It can be expressed as O(n).
In the best case, such when the target is 3 it only performs one operation. It can be expressed as Ω(1)