logoalt Hacker News

theokrueger • today at 2:59 AM • 1 reply • view on HN

Big O basically drops constants

O(2n+1) = O(2n) = O(n)

o(2n+1) > o(2n) > o(n)

Both define upper boundary, but big O can read like "the function is generally proportional to ___" and little o can read like "the function is never more than _____"


Replies

bobmarleybiceps • today at 3:13 AM

that's not the convention I know... (from CLRS algorithms book).

Big O is sort of like <=. little o is sort of like <.

https://dl.acm.org/doi/10.1145/1008328.1008329

➕ show 1 reply