Two ways to solve a maze. The faster one gives the worse answer.
Same maze, two algorithms. One looked at 40 cells. The other looked at 117.
You'd think the one that did less work is better. It isn't. It found a path that's 10 moves longer.
BFS spreads out
BFS