3 ms·
When doing recursion (Postgres recursive CTE) I keep a path on the latest edges and check to see new edges aren't already visited, so same nodes can appear in m
by patates 6y ago
When doing recursion (Postgres recursive CTE) I keep a path on the latest edges and check to see new edges aren't already visited, so same nodes can appear in multiple branches but not on the same branch. Works flawlessly.
- pfarrell 6y agoCan you provide an example of this? I’d like to understand this technique. Edit: is this an example? https://stackoverflow.com/a/1757915 https://stackoverflow.com/a/1757915