I have used ans==0 condition for getting only one test case as output…
Some test cases getting wron and run error
Last test case still failing and whats the reason for not using rightS||downS together.
You were replying really fast and I am stuck with backtracking part from the complete day so tagged you
@piyush.bansal8158625 You just need to generate the rightmost path. Please check your code. It is not giving the desired output even for the sample test case.
Please check this: