Design Twitter
Design a simplified Twitter with post, follow, unfollow, and news feed. Think about: How to efficiently retrieve the 10 most recent tweets? Hint: Consider using a heap to merge sorted tweet lists. Example: post_tweet(1, 5) get_news_feed(1) → [5] follow(1, 2) post_tweet(2, 6) get_news_feed(1) → [6, 5] (most recent first)
Design Twitter tests whether you can keep a best-so-far structure honest as you go. Interviewers love it because it reveals your priority-based reasoning and your edge-case discipline. The trap is stale entries or unbalanced structures—be clear about what belongs in the heap.

Meet Coco
Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.