Skip to Main Content
Mazes for Programmers
book

Mazes for Programmers

by Jamis Buck
July 2015
Intermediate to advanced content levelIntermediate to advanced
286 pages
6h 31m
English
Pragmatic Bookshelf
Content preview from Mazes for Programmers

Eller’s Algorithm

Eller’s algorithm was invented by Marlin Eller in 1982. It shares some remarkable similarities with Sidewinder (here), and yet manages to avoid the striking bias of that algorithm by incorporating some of the features of Kruskal’s (here) as well.

Like Sidewinder, it works by considering only a single row at a time, while building up sets (Kruskal-style) to keep track of which cells are reachable from which other cells. Let’s work through an example.

We’ll start at the top row (for convenience’s sake), and we’ll highlight the current row in yellow, to keep track of where we’re at.

images/ellers-01.png

The first thing we do is assign each cell in that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Exercises for Programmers

Exercises for Programmers

Brian P. Hogan

Publisher Resources

ISBN: 9781680501315Errata Page