← Google questions

MEX-like problem with sequence numbers and queries

Filed under Google

Given an initial sequence number x, maintain incoming packet sequence numbers and support two operations: add(y) to insert a sequence number y, and get_missing() to return the smallest sequence number…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Google questions

Collected from public candidate posts and coding forums. Updated Nov 2026.