I realize that each time I have to deal with the Big-O notation I am questioning myself why complexity in time or space share the same formal notation/letter. It is always confusing when I read examples in books because authors don't always give precision about whether the given result is a time or space complexity.

So, when you see that an algorithm has a O(n) complexity, you don't know much. You have to say: this algorithm has a O(n) time complexity.

IHMO I think it would be much more useful to use two separated letters like O(n) and T(1) for instance.

Is there such convention when talking about algorithm complexity?


Big O notation comes from number theory.

It's not about time or space at all. It's about the rate of growth of functions.

Even in computer science, we use it measure many other quantities, for example the number of rounds in a protocol, the depth of a circuit, the error probability of an algorithm, and so on.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.