How to Think Recursively | Solving Recursion Problems in 4 Steps

Jack Chen
Jack Chen
May 12, 2019 · 9 min read
Original comic from Safely Endangered. No idea who created this variant of the meme.

Disclaimer

This article is not meant to introduce more advanced concepts like dynamic programming. Instead, it will introduce the mentality required to start solving recursive problems.

The examples are in Javascript, but I’ll write answers in Python and C++ in the bottom of this article.