Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
anonytrary
on Nov 30, 2020
|
parent
|
context
|
favorite
| on:
I Made a Self-Quoting Tweet
Graph doesn't need to cycle to hit a node twice. Good code does not visit the same node twice.
patates
on Dec 1, 2020
|
next
[ā]
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
on Dec 1, 2020
|
parent
|
next
[ā]
Can you provide an example of this? Iād like to understand this technique.
Edit: is this an example?
https://stackoverflow.com/a/1757915
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: