Problem 4 initial solution
Reduce recursion footprint for better memory performance