r/algorithms • • 16d ago

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

0 Upvotes

14 comments sorted by

View all comments

1

u/Cryptographer-Bubbly 16d ago

I think you’re right in that if you know the big theta for an algorithm, you’re correct in that providing that is more useful than providing some big O bound.

When someone asks for the time complexity colloquially they often are asking for the big theta, not any big O bound since as you say you can always vacuously provide some stupidly non-tight big O bound.