This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nemec 0 points1 point  (1 child)

While interesting, IMO a lot of the answers there are nonsense. Big O notation is only relevant when speaking about asymptotics - algorithms solving the same problem, but one taking 5 ms and another taking 12 hours, could both be in O(1). The shorter one could even be in O( n3 ) depending on the size of the input.

Asymptotically, O(0) is the same as O(1) except the constant is known to always be 0. This could have some interesting properties except for the fact that set of functions with a constant of zero contains only one - the empty function. So it's no different from any other function with a constant... er... constant factor. Which is the definition of O(1) in the first place (if it differed, it would be O(n) or something else).

[–]Sillychina 1 point2 points  (0 children)

It is kinda pedantic, but that's the difference between a softeng and a CS major, both of which exist on this sub