5 ms·
The solutions here make the common mistake of ignoring the cost of stack space, and thereby incorrectly claiming that recursive solutions have lower space compl
by fjdlwlv 9y ago
The solutions here make the common mistake of ignoring the cost of stack space, and thereby incorrectly claiming that recursive solutions have lower space complexity than iterative solutions.
- curiousDog 9y agoNot if you point out that whatever platform you're coding in employs tail recursion I guess? But yeah the intermediate results will still have to be stored somewhere.