Virtusa Interview Question

one of the question is to implement recursion