Skip to main content
Design Twitter | AlgoCracked
AlgoCracked
ProblemsDesign Twitter
Medium36.0% acceptance
Blind75Hash TableLinked ListDesignHeap

Design Twitter

Design a simplified Twitter: postTweet(userId, tweetId) , getNewsFeed(userId) (the 10 most recent tweet ids from the user and everyone they follow, most-recent first), follow(followerId, followeeId) , unfollow(followerId, followeeId) . Twitter() constructs it. Input format Operation names + parallel argument lists. getNewsFeed returns a list of tweet ids.

Loading workspace…