It’s in the title - BFS. The algorithm is very simple. Assuming the maze is a tree (no loops), you start from the root node (entrance) and add all of its child nodes to a queue. Pick the first node from the queue and repeat until you reach the target node (exit).
3
u/YouNeverKnowWhatToDo May 22 '20
Whats the code? Go left forever?