Closed stevenbird closed 8 years ago
Thanks @cyderize. I'd like to refine this a little, making less use of global variables. Could the current node and the path so far be make formal parameters for the block? I think it's fine to accumulate the results in a global variable.
Yes, that would make a lot of sense to do.
I'll open a new PR with a revised example.
Actually, the result list works as a third parameter too, and this is probably cleanest.
Closed by #413.
There is a backtracking algorithm that explores all possible hamiltonian paths by using DFS on a decision tree (this tree is just the call graph of the algorithm, it is not instantiated):
Please create a new Edgy example for this algorithm.