3 ms·
The closed form solution isn't O(1). It's Ω(2^N) since the number of digits in the output is Θ(2^N).
by klodolph 17y ago
The closed form solution isn't O(1). It's Ω(2^N) since the number of digits in the output is Θ(2^N).
- InclinedPlane 17y agoOn the most prevalent electronic computers of our time the closed form solution is effectively constant-time if the output is bounded to be within the limits of a 32 or 64 bit integer.