Tip 1 : prepare data structure
Tip 2 : prepare dbms
Tip 3 : be confident
Tip 1 : your positive only
Tip 2 : prepare your cv topics
It was an online test which had different rounds
We have to put the ball in the hole in minimum movement of the tiles.



Here, sorted paths mean that the expected output should be in alphabetical order.
Given a square matrix of size 4*4 (i.e. here 'N' = 4):
1 0 0 0
1 1 0 0
1 1 0 0
0 1 1 1
Expected Output:
DDRDRR DRDDRR
i.e. Path-1: DDRDRR and Path-2: DRDDRR
The rat can reach the destination at (3, 3) from (0, 0) by two paths, i.e. DRDDRR and DDRDRR when printed in sorted order, we get DDRDRR DRDDRR.




Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?