- Midterm #2 Review
- Recursion Review
- Base case (terminating one)
- Recursive call

- Example: list of permutations of string
[
*perm.py*]- Base case: empty string gives list of empty string
- Recursive part
- Remove first letter
- Generate list of permutations of rest of string
- New list: first letter in all positions for all elements of list

A PDF version is available here.

ECS 10, Basic Concepts of Computing Winter Quarter 2012 |