Design a capacity-bounded buffer of high/low-priority messages: push evicts low-priority messages first when it overflows, and drain removes messages until a size limit is passed. The third round of an Amazon SDE onsite.
Design a capacity-bounded buffer of high/low-priority messages: push evicts low-priority messages first when it overflows, and drain removes messages until a size limit is passed. The third round of an Amazon SDE onsite.
The discussion opens with the full question.