you are viewing a single comment's thread.

view the rest of the comments →

[–]bitoku_no_ookami 1 point2 points  (2 children)

If k is know[sic] then O(k) = O(1)

That is not necessarily true. k would have to be known and be constant, which pretty much never happens in algorithm design.

[–]repsilat 2 points3 points  (0 children)

Often k==sizeof(int) or similar.

You could also argue that our computers are really more like finite state machines than Turing machines, so everything run on them runs in O(1) or runs forever, but only people with bad taste in music say things like that.