Bird
0
0

Given a system where emergency alerts are queued and processed asynchronously, what is the expected output if the queue is full and a new alert arrives?

medium📝 Analysis Q4 of 15
LLD - Design — Elevator System
Given a system where emergency alerts are queued and processed asynchronously, what is the expected output if the queue is full and a new alert arrives?
AThe queue size automatically doubles
BThe new alert is dropped or rejected
CThe system processes the alert immediately
DThe system crashes
Step-by-Step Solution
Solution:
  1. Step 1: Understand queue behavior under full load

    When a queue is full, new incoming items are typically dropped or rejected to avoid blocking or overflow.
  2. Step 2: Evaluate other options

    Immediate processing is impossible if queue is full. Automatic resizing depends on implementation but is not guaranteed. Crashing is a failure, not expected behavior.
  3. Final Answer:

    The new alert is dropped or rejected -> Option B
  4. Quick Check:

    Full queue behavior = Drop new alerts [OK]
Quick Trick: Full queues usually drop or reject new items [OK]
Common Mistakes:
MISTAKES
  • Assuming queue auto-expands always
  • Expecting immediate processing despite full queue

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes