Algorithm Analysis – Understanding Lower and Upper Bounds of an Algorithm

algorithm-analysisalgorithms

I am learning about analysis of algorithms.

I came across the term "upper bound" and "lower bound" in "worst-case" running time of an algorithm.

Are they applicable to only the "worst case" or can be used with other cases also ("average case " and "best case")?

Best Answer

They are applicable to all cases, but "worst case" is the one most programmers go by because it's just better to always assume the worst case (when designing algorithms).

Related Topic