Recursive Programming
Recursion is the computer concept that is closely related to While and For Loops. The key difference is that While and For Loops usually have an end condition of some kind such as X = 5. Recursion will only terminate when it has run out of data to process .
Lets look at an example of recursion:
The above code finds all directories and files below the stated path.
Note that the terminating condition for the loop is to run out of data and the fact that the data the program makes it uses . Making data and then using it in the same loop . The key point is that a nonrecursive algorithim could go only one subdirectory deep and then be forced to stop recrusive algorithims on the other hand can theoritically go on forever.
Recomendations
Identify 2+ ways of using recursive algorithims
Identify the key difference between Recursive and Nonrecursive algorithims
Understand the termination condition of this Recursive program
Modify the Recursive program in some way