r/computerscience
•
u/Significant_Virus142
•
Sep 17 '26
•
1
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
120
Upvotes
View all comments
3
u/7h3kk1d Sep 17 '26
People don’t usually need to know the minimum big O. They need to know if an algorithm scales appropriately with their use case. So if they’re fine with O(n^2) and it finishes in O(n) that’s fine. So big O is saying it’s “at least” this good. If you want something better you need to prove a tighter bound or find a more efficient algorithm. Always requiring a most accurate bound is more work if no one cares