Sure it is, there are plenty of constant-time algorithms, and most of them involve some assumptions about the magnitude of secondary quantities involved. Consider integer multiplication. Clearly in the general case it’s O(n*m) for two numbers with n and m digits (unless you wanna get fancy), but we typically consider it to be constant time because we typically assume a fixed bit width.
replyRight, we assume it doesn’t depend on the size of the input. But that makes it “boring” or degenerate in the context of complexity. Or to put it another way: O(1) is the least interesting complexity class.
reply