Vehicle Maintenance Event Readiness
Reported by candidates from Waymo's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
The mistake that sinks a first attempt on this Waymo question is treating it like a plain open/close bracket matcher. Waymo's Vehicle Maintenance Event Readiness problem, reported in September 2026, looks like a stack problem and isn't. Each maintenance type has its own tiny lifecycle, and a type can only go through it once. It's a hash-table state tracker with three states per type. If you're taking this OA soon, know the trick before you open the editor. StealthCoder sits invisibly as a safety net if your mind goes blank mid-assessment, but this one is short enough to own.
The problem
Each row in events is [action, time, maintenanceType]. Rows are ordered by nondecreasing integer time. An OPEN row starts maintenance of that type, and an END row finishes it. The vehicle is ready exactly when every lifecycle is valid and every opened maintenance event has ended. A lifecycle is invalid when a type is opened while already active, ends while inactive, or is opened again after its completed lifecycle. Return whether the vehicle is ready after all rows are processed. Function isVehicleReady(events: String[][]) → boolean Examples Example 1 events = [["OPEN","10","oil"],["OPEN","12","brake"],["END","20","oil"],["END","25","brake"]] return = true Both distinct maintenance lifecycles end successfully. Example 2 events = [["OPEN","1","oil"],["END","4","oil"],["OPEN","8","oil"]] return = false The same type starts a second lifecycle, which is not permitted. Example 3 events = [["END","3","brake"]] return = false An inactive maintenance type cannot end. Constraints 0 <= events.length <= 100000. Each row contains exactly three strings in the format above. Each action is OPEN or END. Times are decimal integers in [0, 10^9] and are nondecreasing. Maintenance types contain 1 to 40 visible ASCII characters.
Reported by candidates. Source: FastPrep
Pattern and pitfall
Keep a hash map from maintenance type to a state: absent (never seen), active, or done. Walk the rows once. On OPEN, if the type is anything but absent, return false. Otherwise mark it active. On END, if the type isn't active, return false. Otherwise mark it done. After the loop, return true only if no type is still active. The classic pitfall is using a single set of active types. That catches double opens and bad ends, but it forgets completed types, so a reopen after END slips through as valid. Example 2 exists to punish exactly that. Also don't bother with the time field. It's nondecreasing, so there's no sorting and no comparison needed. Empty input returns true. Runtime is O(n) with O(k) space for k distinct types. If you blank on the three-state idea during the live OA, StealthCoder can surface it quickly, but the logic fits in about ten lines.
StealthCoder is the hedge for the one pattern you didn't drill. It runs invisibly during the screen share.
You can drill Vehicle Maintenance Event Readiness cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. If you're reading this with an OA window open, you're who this was built for.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Waymo's OA.
Waymo reuses patterns across OAs. If you're reading this with an OA window open, you're who this was built for. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Vehicle Maintenance Event Readiness FAQ
How hard is the Waymo Vehicle Maintenance Event Readiness problem really?+
Easy once you see it. It's a single pass with a hash map and three states per type. The difficulty is in reading the rules carefully, especially the ban on reopening a finished type. Most failures come from missing that one rule, not from algorithm complexity.
What's the trick to this problem?+
Track three states per maintenance type: unseen, active, and done. A plain set of active types misses the reopen-after-end case. With three states, OPEN is valid only from unseen, and END is valid only from active.
Do I need to use the time values?+
No. Times are guaranteed nondecreasing, so the rows are already in order. You can ignore the time field entirely. Parsing it or sorting by it adds work and risk without changing the answer.
What edge cases should I test before submitting?+
Test an empty list, which should return true. Test an END on a type never opened, an OPEN twice in a row, and an OPEN after a completed lifecycle. Also test a type opened but never ended, which must return false at the end.
How do I prepare for this in 48 hours?+
Write the state-map solution from scratch once, then run the three examples by hand. Spend the rest of your time on general hash-map and simulation problems with validity rules. This question is about careful rule translation, not a fancy algorithm.