|
I've looked at something like that with a friend. This was before I had really done any higher-level coding. We were trying to implement either a BFS or DFS in C using linked-lists to traverse the tree.
I think that this would work pretty well. It will not be optimal, as per the definition, but it should provide you with a working program. You would have to determine which nodes you could visit from the current (the 2D array would help there) and follow them. I like the DFS > BFS in this case because you will traverse a whole path before starting on the next, rather than traversing each path at the same time.
Good luck!
__________________
"Time is an illusion. Lunchtime doubly so."
-the late, great Douglas Adams
|