News for hackers. Stuff that matters.
Re:Hiring Is Broken – My interview experience in the tech in... by yes_or_gnome on Wednesday April 27, 2016 @12:57PM (#11582220)
The simplest algorithm for solving a maze is to pick between 'left' or 'right'; I'll pick 'left'. Then the algorithm is: Whenever you are presented with a choice on which direction to go, then follow the 'left' wall. In the worst case, you'll hit every square and there will be a lot of retracing, but it'll get the job done. It's the equivalent of bubble sort for solving mazes.

(My apologies, to zappo2938, I didn't dive into your code, though I did skim it. I didn't want to create a new top-level comment about the maze problem.)

There are no comments on this comment yet.