In snake and ladder theory

although you have explained fir no. weighted graphs but how its optimal shortest distance how the implementation doest considers other values than tha please explain through edge explanation

@02.adarsh.99 hey basically , bfs hme shortest path hi deta hai ,is question ko as tree consider kia kro ,suppose starting index root node hai and jha jha woh ja skta hai wha se woh uske children to uske sare neighbours ek hi level pe hai ,to level by level define horha hai aur apka jo destination hoga woh shortest level pr hoga and jo uska level hoga woh ans hoga ,visualise bfs like tree nodes .Hope you get it.

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.