Design a small social feed.
postTweet(userId, tweetId) - the user posts a new item. Posts are made one after another; newer posts are more recent. tweetId values are labels: they are not in time order and may be any numbersfollow(followerId, followeeId) and unfollow(followerId, followeeId) - change whom a user reads. Following twice is the same as once, and unfollowing someone you do not follow does nothinggetNewsFeed(userId) - the ids of the (at most) 10 most recent posts made by the user or by anyone they follow, most recent first. A user always sees their own posts; follow(u, u) and unfollow(u, u) change nothing- Do not sort every post of every followed user: the posts of one user are already in time order, so merge them with a heap