Here i have implmented by recursion as asked in question , although all test cases got accepetd… please review it…is it good way or what i can improve
Review my submission
code is correct and okay
your approach is time efficient
you are saving time by using extra space
if you want you can also try the approach which is space optimise means do not use extra space (extra array)
use shifting in the same array