Kindly correct the code
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
4 out of 5 testcases are passing. 1 testcase is giving TLE. Logic reference is of the associated video lecture. https://ide.codingblocks.com/s/206008
@sr30 hey is code me recursion use ki hai ,aap iterative approach try kro ek bar ,If still problem exist then I will provide you code.