Design Nested Comment Threads
A Reddit post is a link or a piece of text submitted to a subreddit, one of the topic communities the site is built from. Below it sits the comment section: replies that hang off the post, replies that hang off those replies, and so on with no fixed limit. That recursive shape is the whole problem. A chat is a flat list you append to. A Reddit thread is a tree you have to store, rank and hand back in pieces, because the biggest ones are far too large to send at once.
Reddit interviewers point the system design round at Reddit's own systems, and the comment tree is one they name directly, sometimes as a low-level design prompt called the "comment threading model." So the job is concrete. Model the data so a deep thread reads cheaply. Rank the replies so the good ones surface. Page the tree so a post with fifty thousand comments loads a screenful at a time instead of everything at once.
- 1 diagram
- 5 sections
- about 45 min
Premium lessonReddit interview guide
These took digging.
What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.
100 companies. Checked every month.
Unlock all 100 companies$49 a year · less than $1 a week · Cancel anytime
Reddit interview guideKnow what Reddit asks before you walk in.
16 coding · 5 system design · 23 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.