3 ms·
You could use the two lists to cache respectively a pre-order and a post-order visit of a graph. E.g. if you have 1->2 1->4 2->3 3->5 4->5 the lists could be [
by bonzini 12y ago
You could use the two lists to cache respectively a pre-order and a post-order visit of a graph.
E.g. if you have 1->2 1->4 2->3 3->5 4->5 the lists could be [1,2,4,3,5] and [5,4,3,2,1].
- throwawaykf05 12y ago1) There's no real pre- or post- order to this graph, just an arbitrary number of traversal orders, and 2) caching the traversals is a different data structure that no longer infringes this patent.