One test case giving wrong output , pls look at the code and explain why
@aryanv Just add ‘\0’ in your output array before printing it in the base case and your code will work fine.
Hope this helps. And if your doubt is cleared, I request you to mark the problem as resolved.
thank you ,it works now.