3 ms·
Stack overflow for large n.
by geophile 16y ago
Stack overflow for large n.
- kinghajj 16y agoAh, I didn't consider that. A decent optimizing compiler should be able to remove all the tail calls (G++ did this with your code and -O2), so this shouldn't be a problem in practice, except maybe for debugging.