4 ms·
Directed graph traversal, orderings and applications to data-flow analysis
- gtrubetskoy 11y agoI found that comparing recursive (your examples are all recursive it seems) and non-recursive traversal code helped me internalize it a great deal, stuff like depth-first vs breadth-first depending on whether you're using a stack or a queue.