why we have added the code line g.addEdge(36,36)-----when we do g.addEdge(35,36) and g.addEdge(30,36) and so on the edge 36 should be added -----why specially to write for the node 36 to add the edge from 36 to 36-----
Snake and ladder
@Lovishbansal because when i=36 , j>=37 so node 36 will never exist (as we are adding edge only if j<=36) thats why sir added 36,36 in the end. (sir told this in the video timestamp-13.50)
hope its clear if yes dont forget to hit like and mark resolved if cleared 
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.