Skip to content

Commit db02874

Browse files
authored
Update design-twitter.py
1 parent afdbde1 commit db02874

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Python/design-twitter.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# Time: O(nlogf), n is most recently number of tweets,
2-
# f is the number of user's following.
3-
# Space: O(u + t + r), u is the number of users,
4-
# t is the total number of tweets,
5-
# r is the total number of followings.
1+
# Time: O(klogu), k is most recently number of tweets,
2+
# u is the number of the user's following.
3+
# Space: O(t + f), t is the total number of tweets,
4+
# f is the total number of followings.
65

76
# Design a simplified version of Twitter where users can post tweets,
87
# follow/unfollow another user and is able to see the 10 most recent

0 commit comments

Comments
 (0)