Define Recursion
Ability of subroutine to call itself
What does a recursive call use
Stack and Stack Frames to store the data from each depth of function call
What must be in a recursive algorithm
Define a base case Define the general case Base case will always be reached Must stop calling itself^^ (otherwise will only stop when all available memory is used)
Recursion Advantages
Has fewer steps (easier for humans to read)
Natural way to process data structures
Recursion Disadvantages
Harder to trace
Uses more memory (stack frames)
Slower (need to manage stack operations)