dsa3 min read
Design Twitter
Design a simplified Twitter with follow/unfollow and a news feed showing the 10 most recent tweets from followed users.
Read →
1575 articles
Design a simplified Twitter with follow/unfollow and a news feed showing the 10 most recent tweets from followed users.
Find the nth number divisible by a, b, or c using binary search with inclusion-exclusion counting formula.
Maximize team performance (sum of speeds * min efficiency) by sorting by efficiency and using a min-heap on speeds.
Build the longest string with at most 2 consecutive identical characters by always using the most frequent available character.
Design a stack that pops the most frequent element, breaking ties by most recently pushed, using frequency-bucket stacks.