Question on tree-walking and mutually-recursive types

Locke riphack@web.de
Tue Jun 29 22:37:00 GMT 2004


Well yes in the case if every node only has one edge (eg. only structs with 
one pointer).
In the case where a node can have multiple edges, Tortoise and Hare isn't 
practicable.
For a directed graph Topological  sort is a very good algorithm.
You only have to make some small changes and don't need the sorting part.
But you would maybe need O(number of nodes) memory which would be a fallback
to Tortoise and Hare.

cu, Locke



More information about the Gcc mailing list