I started by trying to define 'delivered' which actually helped a lot.
Break down the message delivery process into distinct stages (client to server, server processing, server to recipient) and estimate the time for each stage. Use reasonable assumptions about network latency, server processing, and recipient online status to arrive at a median estimate. Clearly state your assumptions and focus on the median case, not the average or worst case.
Pro tip: Emphasize that the median is dominated by the common case where both sender and recipient are online with good network conditions; acknowledge that offline scenarios create a long tail but don't significantly affect the median. This shows you understand real-world usage patterns and statistical nuances.
Confirm what 'delivery' means: does it mean the message reaches the recipient's device, or is it marked as delivered (double check)? Assume delivery to the recipient's device for this estimate.
Outline the stages: sender's device to WhatsApp server (upload), server processing and routing, and server to recipient's device (download). Consider that messages may be queued if the recipient is offline.
For each stage, estimate typical latencies: e.g., mobile network round-trip time (50-100 ms), server processing (10-50 ms), and push notification delivery (100-500 ms). Sum these for the online case.
Recognize that if the recipient is offline, delivery time can be minutes to hours. However, since most users are online when messaging, the median will be close to the online case. Estimate the percentage of messages delivered while recipient is online (e.g., >90%) to justify the median.
Sum the stage estimates to get a median time (e.g., 200-500 ms). Sanity-check against known benchmarks (e.g., typical messaging apps deliver in under a second under good conditions).
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.