How you would code an efficient algorithm which can return a social \'distance\' between two users.
For example, when you visit a profile on LinkedIn you can see wha
I would have assumed that this would be done by applying a shortest path algorithm, such as breadth first search to a graph database. But they appear to store their entire graph in memory, at least according to this.
I'm sure that the algorithm ultimately boils down to some form of shortest path one over a graph structure (nodes and edges).
Edit: Changed the algorithm as per comments.