November 2017
Intermediate to advanced
386 pages
9h 22m
English
The key to solving problems recursively is assuming that you already have a function that does whatever you need, and just call it normally. (Doesn't this sound weird? Actually, it is quite appropriate: to solve a problem with recursion, you must first solve the problem...) On the other hand, if you try to work out in your head how the recursive calls work and attempt to follow the flow in your mind, you'll probably just get lost. So, what you need to do is: