Verified interview challenge
Build follow graph snapshots
Keep historical versions of a social graph queryable while users continue following and unfollowing each other.
Unlock with Full AccessThe challenge
Process updates to a directed follow graph and freeze snapshots of its state. Queries ask about relationships and recommendations at a particular snapshot. Later changes must leave those historical results intact, including the ordering of recommendation results.
What you'll practise
Historical state
Preserve the graph at each snapshot while continuing to update the live version.
Directed relationships
Keep followers and followees distinct across updates and historical queries.
Recommendations
Rank candidates from the selected snapshot using the supplied scoring and tie rules.
def follow_graph_results(
operations
):
# Your implementation goes here
passRun your code to see results.