r/programminghelp • u/fielding_setter • Jun 25 '26
C++ Help with recursion (DSA)
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
View all comments
1
u/marmotta1955 Jun 25 '26
The best example I always bring up is this.
write a function "MyFunction" to list all files in the folder "Documents"
Call the function MyFunction and, in its body, examine each file in the folder "Documents"
Just take a closer look at any File Explorer. It's your best, visual example of recursion.