New answers tagged

2

Generalizing your graph search function The reason you had to write two versions of the graph search algorithm is that you merged the search operation with the action you want to perform on each node. You have to separate the two. There are various approaches you could use. One is to create an iterator class that can be used to iterate over the graph in the ...


Top 50 recent answers are included