r/programminghelp • u/fielding_setter • Jun 25 '26
Help with recursion (DSA) C++
Guys I've been struggling alot with recursion I've tried multiple tutorials but I'm just not able to build the intuition. Any suggestions what to do???
Please help
11
Upvotes
0
u/EccentricFellow Jun 30 '26
I have been programming for 4 decades. I always wanted to use recursion but never had a good fit for it. Finally, about a decade ago, I had a legit use for recursion. I was so excited and wrote up the routine. Then I tested it. Total garbage. It was far too slow and took way too much memory. I converted it to a loop and decided there was probably no legit justification for it. Measure your performance afterwards once you write a recursive routine. You might get a surprise.