Ask students “What is the simplest input to this problem?” when teaching recursion to help students learn to identify appropriate base cases for each argument of their function. | Computer Science Teaching Tips

Ask students “What is the simplest input to this problem?” when teaching recursion to help students learn to identify appropriate base cases for each argument of their function.

For instance, factorial functions have one input, so they should expect one base case whereas recursive functions with two inputs will generally have two base cases, one for each of the extreme values.