logoalt Hacker News

IsTomyesterday at 5:59 PM1 replyview on HN

If k = n - constant it comes out to O(1).


Replies

mwkaufmayesterday at 5:59 PM

Every O(n) is O(1) if n = 1. Complexity measures worst-case by-definition, not all cases.

show 1 reply