Hacker News new | past | comments | ask | show | jobs | submit login

Those child users don't then have their own child users (because it's cyclic) so do you have to choose one option of the two, both with a drawback?

I was thinking you could replace or supplement the real user IDs with their indices in the array of returned users.




I am sorry, but if possible, could you elaborate @chrisseaton? (preferably with a bit more punctuation :D)


With more punctuation? What's that supposed to mean? I've written two short sentences. It's not some wall of text.


So, is a hypothetical scenario, an employee that is their own supervisor?


Yes, but I'm not sure if you're implying that it's a nonsensical situation with that example. Lots of real-world graphs have genuine cycles.


For a good example of unexpected cycles you can see this classic question on genealogy software:

https://stackoverflow.com/questions/6163683/cycles-in-family...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: