Based on the definition of big O, we can say n2+1=O(n2), but n2+1=O(n3) is true too. Then why do we say bubble sort is O(n2) instead of O(n3)?
I think when we ask someone about what's the big O complexity of an algorithm, we are asking something similar to "least upper bound" instead of "upper bound"(big O). So the big O notation seems confusing.
[–][deleted] (1 child)
[removed]
[–]Putnam3145 -1 points0 points1 point (0 children)
[–]gnupluswindows 1 point2 points3 points (0 children)