Types Of Recursion Homework Help
Each of these good examples demonstrates a different type of recursion:
- The factorial as well as binary Search techniques are examples of linear recursion, in which only one recursive call is made per recursive step.
- The choose technique is an example of tree recursion, in which two (or more, in general) recursive calls are created within a minimum of one recursive step.
The recursion tree for choose exposes an inefficiency: some recursive calls do redundant work (though this is not always true for tree-recursive algorithms).