Implementation of STANDARD PROBLEMS using RECURSION METHOD