Is there a way to conditionally take control/modify the flow during a depth-first scan or the breadth-first scan ?
Say, for example, if a particular node if found, consider it as a leaf-node and continue with the rest of the processing as usual (meaning do not traverse its child-nodes).
I need to explore pathways starting from a node.
I think DFS would be one (quick+suitable for my purpose) way to explore all possible pathways.
But as soon as I see that the current path is NOT a solution, I need the algorithm to stop there and not process the child nodes further.
(I am thinking of using DFS since I find the events very handy)
Can this be done?
– my account_ram Sep 29 '12 at 16:13