KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
UserA-UserB-UserC-UserD-UserF Users connected by '-' know each other. And I need an algorithm for these 2 tasks: Calculate the path from UserX to UserY For UserX,calculate all users that is no more than 3 steps away. Is there an efficient solution? EDIT My purpose is not to prove it right or wrong,but to calculate the result real time when necessary. Plus,I think the most expressive way is code,even pseudo ones. EDIT AGAIN I've decided that this kind of job must be done inside database,so it must be a sql solution!
Tags (comma-separated)
Save Edits
Cancel