One of the test cases is failingā¦please can you check my codeā¦
Snake and Ladder Board
hi @Anshit
you have fogot this case
If there is no solution, print -1.
1
1
3 90
7
99 10
97 20
98 30
96 40
95 50
94 60
93 70
for this input ans is not possible so you have to print -1
hint : just write if(dist[100]==0)return -1; before returning ans
i hope this help
if your doubt is resolved please mark as resolved
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.