advancedConcurrency Machine Coding166 of 436

Machine coding: in-memory Twitter — createUser, postTweet, getNewsFeed, follow, unfollow

Tests whether you can design clean object boundaries (User, Tweet, a follow graph) and implement getNewsFeed as a k-way merge of each followee's tweets by timestamp, rather than sorting the full combined list each call.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

← Back to all Core Java questions