logoalt Hacker News

progvalyesterday at 7:44 PM0 repliesview on HN

No, it's not just about cycle counting.

Worst-case O(n-k) complexity in general implies worst-case O(1) complexity for the set of cases where k=n-<constant>. There are still multiple cases, just a subset of those that don't include worst of the general case.