@O17LPOLA020023 Sir can u pl check where i am failing in code

code:https://ide.codingblocks.com/s/212579?_ga=2.81796112.743699700.1585892021-854004085.1585301568

Hi @spagire4 , can you provide me your logic and some comments in your code so that it will be easy for me to check the code

sir i updated code with comments

code:https://ide.codingblocks.com/s/213596

Hi @spagire4, here when you are considering the distance between the end of the tunnel and the ending point then there can be the cases when there is another tunnel between them further reducing the distance

Its really complicated to solve this problem using graph as there would then be lot of corner cases for you to handle, try to do this using dp
i will try to solve it using dp and share the solution with you

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.