4 ms·
Without dynamic memory allocation? I think you'd need at least O(n) memory to store enough state to go exponential. But it's some time I did complexity theory;
by tgv 3y ago
Without dynamic memory allocation? I think you'd need at least O(n) memory to store enough state to go exponential. But it's some time I did complexity theory; I could be wrong.
- adrianN 3y agoUnless your input is read-only you should always have O(n) memory available.