Develop a system that calculates the number of connections (hops) between two users in a professional network, similar to LinkedIn's feature. This system should efficiently determine and display the shortest path of connections, helping users understand their network reach and discover potential contacts.
Suggested time: 45 minutes
Loading the workspace...
When you visit someone's LinkedIn profile and see "2nd degree connection," a system computed the shortest path between you and that person through the social graph in real time. Designing a network connection path analyzer means building the graph traversal infrastructure that answers the question: how are these two people connected, and through whom?
Design a Network Connection Path Analyzer: editorial solution
Community solutions for Design a Network Connection Path Analyzer
Designing a Simple URL Shortening Service: A TinyURL Approach (easy)
Design an API Rate Limiter (medium)
Design a Video Conferencing system (medium)