3 ms·
If your data is "mostly a tree but has the occasional back reference I can easily identify as a back reference", that works great and I've used it in other lang
by jerf 5y ago
If your data is "mostly a tree but has the occasional back reference I can easily identify as a back reference", that works great and I've used it in other languages.
But in the limit, as your data becomes maximally "graphy" and there isn't much you can do about it, this ceases to be a viable option. You have to be able to carve a "canonical tree" out of your graph for this to work and that's not always possible. (Practically so, I mean. Mathematically you can always define a tree, by simple fiat if nothing else, but that doesn't help if the only available definitions are not themselves practical.)
- nu11ptr 5y agoFair point - so far I've been lucky enough to avoid such use cases