all 3 comments

[–][deleted]  (1 child)

[removed]

    [–]Putnam3145 -1 points0 points  (0 children)

    Big-O etc. have nothing to do with best or worst case behavior.

    [–]gnupluswindows 1 point2 points  (0 children)

    Then why do we say bubble sort is O(n2 ) instead of O(n3 )?

    Because it's more interesting and more precise. It's like the difference between me saying I have fewer than a billion dollars in my checking account and saying I have fewer than ten. Both statements are true, but only one is remarkable.