Question
Design a mini social feed. Support operations replayed in order: ["post", userId, tweetId] records a tweet; ["follow", followerId, followeeId]; ["unfollow", followerId, followeeId]; ["feed", userId] which returns the 10 most recent tweet IDs (newest first) posted by the user or anyone they follow. A user implicitly follows themselves. Return the list of feed results (each a list of tweetIds) for every feed operation, in order.
mini_twitter(ops: list[list]) → list[list[int]][[["post",1,5],["feed",1],["follow",1,2],["post",2,6],["feed",1],["unfollow",1,2],["feed",1]]]out[[5],[6,5],[5]]State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.