@anthracite Its ALMOST a binary tree, just four possible directions instead of two, and one of them is where you just came from so you'll never need to go that way at least!
@anthracite Also thank you, holy wow thats a different approach than I muddled through for that one! O.O