LeetCode Question · Feb 2025 · San Francisco

AngelOne | SDE 3 | LLD Round

143 views 2 replies

Question Details

Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and is able to see the 10 most recent tweets in the user\'s news feed. ...

Full Details

  1. Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and is able to see the 10 most recent tweets in the user\'s news feed.
    Aspects to cover:
    \t- APIs (Request/Response)
    \t- DB Schemas

  2. Implement the following in any IDE (https://leetcode.com/problems/design-twitter/description/):
    \t1. Twitter(): a constructor to initialize the Twitter object.
    \t2. postTweet(userId, tweetId): allows a user to post a tweet.
    \t3. getNewsFeed(userId): retrieves the 10 most recent tweets from the user and the users they follow.
    \t4. follow(followerId, followeeId): allows a user to follow another user.
    \t5. unfollow(followerId, followeeId): allows a user to unfollow another user.

About This Question

This is a reported interview question from a twitter/x interview for a swe role during the phone screen round reported in 2025.

It covers the following topics: System Design .