← 返回 doordash 的题目列表Simplified Twitter System API and Data Structure Design
类型:online_judge
doordash
Design a simplified version of a Twitter system with the following three features:
Publish a new feed: Users can publish a feed containing text.
View follower's feeds: Users can view the latest feeds from the people they follow, ordered by time.
Add comment to a feed: Users can add a comment to a specific feed.
Please describe the API design needed for each feature in detail and provide descriptions of the corresponding data structures and methods.
Example
Input
POST /user/1/feed {'text': 'Hello, World!'}