To solve a problem using recursion,you have to do two things:
1.You have to show how to solve the problem in the general case by breaking it down
into a finite number of similar ,but smaller,problems.
2.You have to show how to solve the smallest version of the problem--the base case
--by some finite number of operations.
1.You have to show how to solve the problem in the general case by breaking it down
into a finite number of similar ,but smaller,problems.
2.You have to show how to solve the smallest version of the problem--the base case
--by some finite number of operations.