Lee algorithm
[Image:lee waveprop.png|thumb|Wave Expansion step]
The Lee algorithm is one possible solution for maze routing problems based on breadth-first search.
It always gives an optimal solution, if one exists, but is slow and requires considerable memory.
Algorithm
InitializationWave expansion
Backtrace
Clearance
Of course the wave expansion marks only points in the routable area of the chip, not in the blocks or already wired parts, and to minimize segmentation you should keep in one direction as long as possible.