Hackerrank 30 days of code Java Solution: Day 9: Recursion

So for the day 9 of code we will get familiar with the recursion technique.You can read in depth about Recursion from here.

Task
Write a factorial function that takes a positive integer, as a parameter and prints the factorial, Using Recursion technique.

Note: If you fail to use recursion or fail to name your recursive function factorial or Factorial, you will get a score of .

Sample Input

Sample Output

Hope you have tried by yourself and than finally you have landed here for the solution 🙂

Hope you like the post.More upcoming 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *