With the reference of this answer, what is Theta (tight bound)?
Omega is lower bound, quite understood, the minimum time an algorithm may take. And we know Big-O is for upper bound, means the maximum time an algorithm may take. But I have no idea regarding the Theta.
Big O is the upper bound, while Omega is the lower bound. Theta requires both Big O and Omega, so that’s why it’s referred to as a tight bound (it must be both the upper and lower bound).
For example, an algorithm taking
Omega(n log n)takes at leastn log ntime, but has no upper limit. An algorithm takingTheta(n log n)is far preferential since it takes at leastn log n(Omega n log n) and no more thann log n(Big O n log n).