Was asked to design a graph problem similar to what we have on Linkedin
given a function getFriend(int user) which returns all the users 1st degree friends, write a function to check:
EDIT: there was also a followup:
Find all 2nd degree connections but output the connections sorted by the number of common friends with you,
Example: if 2nd degree connection A has 10 common friends (1st degree connections) with you but 2nd degree connection B has 8 common friends
(1st degree connections)with you, then A should be ranked first)