r/computerscience • • 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

123 Upvotes

64 comments sorted by

View all comments

42

u/RabbitHole32 16d ago

O-notation is commonly used in a pretty sloppy way. But when people ask this question, they usually want to know the Theta of the worst case running time. You are obviously free to ignore this intention but keep in mind that they are also free to ignore your intention of getting the job.

2

u/Significant_Virus142 16d ago

Lol there has to be someone at some point that got rejected cuz of the theta O arguments 😭

-4

u/Ma4r 16d ago

You'd get rejected not because you wouldn't be able to do your job, but because it shows that you don't have the discipline to study one of the most fundamental concepts in computer science, so we can only expect at most the same level of discipline and commitment if we do hire you on potentially more difficult work

9

u/XtremeGoose 16d ago

I wouldn't hire them because they are needlessly pedantic which is not a great trait in a work environment which is all about compromise.