Thanks to everyone replying with ideas and alternate solutions. More efficient ways of solving problems are always welcome, as well as reminders to question my assumptions.That said, I\'d like you to
Usually when I\'ve had to walk a graph, I\'ve always used depth-first sear开发者_开发知识库ch because of the lower space complexity.I\'ve honestly never seen a situation that calls for a breadth-first
I am trying to find the nearest neighbor in recursive depth-first-fashion. There are many elements involve prior to getting to this point, to keep it simple I have only included the section that I am