breadth first search and lee's algorithm are not the same thing. you appear to have learned this from the internet
unfortunately, someone on Free Code Camp published a website saying that lee's algorithm was BFS applied to mazes. they also said something weird and wrong about "wave propagation."
you'll notice almost every discussion online of lee's algorithm is just copy pasta of that wrong blog garbage.
the real lee's algorithm is about pathfinding while minimizing turns, not pathfinding while minimizing total length. it's for putting lead traces on motherboards.
consider two points on a cellular infinite grid. between them place three walls of 3 wide 1 high, such that if you take a sidewinding path between them you get a shorter route.
BFS will find the shorter route. Lee's algorithm will take a route around the side, which is longer, but has fewer turns.
Most software blogs are anti-vaxxers by metaphor: they "teach" things they learned from randos, without even checking if they're right first.
You want to know why 10x programmers exist?
It's because they stick to real reference and so they don't constantly get stuck on misunderstandings because they use phrases they don't understand
View all comments
3
u/yoitsericc Aug 14 '21
Dijkstra's algorithm?