All Posts

1276 articles

dsa2 min read

Minimum Number of Refueling Stops

Find minimum fuel stops to reach the target by greedily selecting the largest available fuel stations when running low.

Read →
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 →
dsa2 min read

Ugly Number III

Find the nth number divisible by a, b, or c using binary search with inclusion-exclusion counting formula.

Read →
dsa2 min read

Maximum Performance of a Team

Maximize team performance (sum of speeds * min efficiency) by sorting by efficiency and using a min-heap on speeds.

Read →
dsa2 min read

Longest Happy String

Build the longest string with at most 2 consecutive identical characters by always using the most frequent available character.

Read →
Page 72 of 256