InterviewDB
Question
Recommending Friends: Suggest New Connections Based on Mutual Friends in a Social Graph
phone
Question Details
Problem Given a social network as an adjacency list, recommend friends to a user based on the number of mutual connections. Return the top k non-friends sorted by mutual friend count descending, then by user id ascending on ties. Example: Approach Fo…
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Coding
Onsite
Phone