3 ms·
I suppose I had trouble with recursion until I understood that each call should strive to be stateless - meaning, you don't try and remember previous results. E
by vdnkh 11y ago
I suppose I had trouble with recursion until I understood that each call should strive to be stateless - meaning, you don't try and remember previous results. Each new call should be just the same as the initial. You only act on the current set and try to reduce the problem further. Trying to remember previous iterations results in a lot of headaches.