The function recursively calls itself while removing the first character of the string until it reaches the base case. O(n) due to the recursion stack.
From Day 4, you understand how recursion works. You can write recursive functions. You can trace through them and predict their behavior. But there's a catch. This simple idea—caching results to avoid ...