Code Room
CodingEasycod-g1320
Subject Log processingLevel Entry–Mid~11 minCommon in Algorithms & data structures interviewsIndustries Software development

Question

Each event shipped by a log agent carries a sequence number, and the collector wants to know what got dropped in transit. You receive the sequence numbers that actually arrived — distinct positive integers, possibly out of order because of retries. Return every missing sequence number between the smallest and largest received values, in ascending order. If fewer than two numbers arrived, or the range is complete, return an empty list.

Implement
missing_sequences(seqs: list[int]) → list[int]
Examples
in[[7,3,5,8]]out[4,6]
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.