I found this problem under the recursive section and since it has already been taught once by prateek bhaiya, i used the exact same approach as he explained.
While my solution seems to be running well for custom cases its hitting a TLE in the testcases.
Please review my appraoch, its quite simple and uses basic recursion and tell me what i can do to pass the testcases…
Thanks and Regards,