Twitter Object-Oriented Design & Heaps Question | OA - 2023 - November | On-campus
Question · Posted Jun 2026
Question 1: Design Twitter Problem Statement Design a simplified version of Twitter where users can post tweets, follow/unfollow another user, and see the 10 most recent tweets in their news feed. Implement the Twitter class: Twitter() Initializes your twitter object. void postTweet(int userId, int tweetId) Composes a new tweet with ID tweetId by the user userId. Each call to this function will be made with a unique tweetId. List<Integer> getNewsFeed(int userId) Retrieves the 10 most recent tweet IDs in the ...
The full answer & interview discussion are available to premium members.
Log in Create a free account