LLD | Design Facebook Comment System
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2023-10-12Added By Anonymous
Source: Link
Company: Meta (Facebook)
Role: unknown
Interview Stage: Onsite
Location: unknown
Year: unknown
Original Post Content:
Design Facebook Comment System
Application Requirements:
1. Users should be able to comment on posts
2. Should be able to reply to comments
3. At most one level of nesting is allowed. If a user replies to a nested comment, the comment should appear below the previous comment
4. Users should be able to edit and delete their comments. The nesting should adjust on its own
Required Classes
1. User Class
2. Comment Class
3. Post Class
Below is the entire code for the LLD