r/computerscience • u/Significant_Virus142 • Sep 17 '26
Help Why use Big O notation?
If someone asks for big O time complexity of an algorithm but expects only the minimum of the possible big Os then is that even Big O notation anymore? cuz if the big o time complexity of an o(n) algorithm is asked then according to the condition of big O notation O(n square) would also be a valid answer
123
Upvotes
View all comments
Show parent comment
2
u/PersonalityIll9476 Sep 17 '26
That's not what Theta means. Theta means it is bounded above *and* below by that complexity, so it is exactly that. If I write "f(n) is Theta(n^2)" then it can not grow slower than n^2 nor faster, so it is basically a constant times a quadratic polynomial.
If you want to be precise, you could reply by saying "this function is o(n^2)" (note the little-oh) for upper bounds that are not tight.
People are just asking for the best known upper bound, colloquially. That's all.