Suppose we have a function, f(n)=n+10. We say that f(n)∈O(n). Meaning O(n) represents the upper bound of the function.
Its is also true that f(n)∈O(n^2) or f(n)∈O(n^3) and so on.
So how can we say that O(n) is the upper bound when O(n^2) is comparatively bigger bound and O(n^3) is much bigger bound?
Please forgive if I have understood the concept wrongly.
Aucun commentaire:
Enregistrer un commentaire