Anonymous · shared experience1 Oct 2025 · 4 views
Waymo: Split a bag of integers into groups, with tightening rules
Problem. You get a multiset of integers. The task grows in three stages:
- Split them into groups where every value in a group is the same.
- Split them into groups of exactly 5 consecutive integers.
- Split them into groups of 3 or more consecutive integers.
What happened. The candidate solved the first two stages cleanly in Java. The third stage was much harder and turned into explaining an approach and debugging live.
What mattered. Correctness, time and space complexity, and how well the code adapted as the rules changed. For stage 3, a greedy pass over sorted values with a count map and a map of open sequences waiting to be extended is the usual approach.
Comments 0
No comments yet. Ask the author something, or add what happened in your own round.