Scene 5 of Graph Traversals in Core Technical Interview Questions for Software Engineers
By Amin Ariana — September 2010
Write the algorithm that LinkedIn.com uses to tell you how many professionals you have access to.
Scene 5 of Graph Traversals in Core Technical Interview Questions for Software Engineers
By Amin Ariana — September 2010
Problem Statement
Write the algorithm that LinkedIn.com uses to tell you how many professionals you have access to, at up to three nodes away in your social network. For example, you might have 100 friends, 10,000 friends of friends and 1,000,000 friends of friends of friends. The answer is less than 1,010,100 considering how a friend could also be a friend of a friend. Keep in mind that anybody might be anybody else's friend.
Evaluation
References
Chris is one of the first 4 engineers at Lionside, a Bay Area gaming startup. He asked me this question during an interview.