Reported interview periodJan 2026–Aug 2026
Follow graph with snapshots
Implement a directed social graph with add_user, follow, and create_snapshot.
Practice focusA snapshot must preserve the follow relationships that existed when it was created. Later mutations to the live graph must not change earlier snapshots. A snapshot supports is following , get following , get followers , and recommend . Self-follows and repeated follows are no-ops. Rank recommendations by the number of two-hop mutual connections in descending order, then by user id in ascending order; return at most k users. Exclude the requesting user and accounts they already follow. Follow-ups 1. Add unfollow while preserving earlier snapshots. 2.…