You are viewing a single comment's thread. Return to all comments →
For python3, i have used next starter before BFS cycle:
visited = set() queue = [] ladders = {i:j for i,j in ladders} snakes = {i:j for i,j in snakes} queue.append((1,0))
Seems like cookies are disabled on this browser, please enable them to open this website
Snakes and Ladders: The Quickest Way Up
You are viewing a single comment's thread. Return to all comments →
For python3, i have used next starter before BFS cycle: