------used recursive function------
1 Submission by RAVI KC
Beginner Intermediate Advanced Unknown Difficulty