Hacker News new | ask | show | jobs
by gigantum 2585 days ago
You just always start with the base case. It could be recursion is just so simple that your mistake is thinking there must be something complicated.

Also, if the algorithm is not tail recursive, you may be missing that there is an implicit call stack where intermediary results are pushed to.