Design a News Feed
Talk it through out loud with your AI coach.
The problem
- hard
- Pro
Design the home feed of a social network, where each user sees recent posts from the people they follow. Some users follow hundreds of people, and some celebrities have tens of millions of followers. Explain how feeds are built and served quickly.
What a strong answer covers
- The two broad moments when a feed could be assembled, and the cost of each.
- Why accounts with huge followings break the simple approach, and a way around it.
- What is actually stored per user and how the client pages through it.
- Ordering, deleted posts and doing heavy work in the background.
Common mistake: Picking one approach for everyone and never noticing what happens when a celebrity posts.
Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.
Practise it out loud