Take out a piece of paper. We’ll be programming on paper.
Write a method factorial that takes an integer parameter N and returns N!
n!, is the product of all positive integers less than or equal to n.
5! = 5 x 4 x 3 x 2 x 1
Start to write a method
Implement the reducing the problem step for the recursion.
Focus on building the new prefix and word. The new prefix is the old prefix + letter. The new word is the old word without the letter.
You should use: