What to work through
Work through nested comments as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.
- Read the comments under a post, each reply shown under the comment it answers
- Reply to any comment, at any depth
- Load more top-level comments, and more replies under one comment, when asked
- Edit or delete your own comment
Constraints to discuss
- A posted reply shows within 200 milliseconds, before the server has answered
- A thread of 10,000 comments is never drawn all at once
- Deleting a comment leaves the replies under it readable
- Showing and hiding replies works by keyboard and is announced to screen readers
Need a starting point?
Watch for these common gaps as you prepare:
- Removing a failed reply without telling the person
- Deleting a parent in a way that hides the replies under it
- Rendering every comment of a large thread at once
- Inserting new comments silently so the reading place jumps
- Letting reply counts drift from the replies loaded
- Losing a half-written reply when the parent is edited
Why this question is in the collection
These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.