Hash Maps and Counting
A hash map turns a search into a lookup, and the three problems below all lean on that. Two come from one onsite round where the interviewer kept changing the rules on the same bag of integers. The third comes from a phone screen.
Decide what the map holds before you write code. After that, each solution is a loop over keys or over pairs. Progressive rounds like this one reward code that's easy to change. When the rule moves, you want to change one condition and keep the rest of the loop. Keep the counting separate from the rule you check, and the second answer comes quickly.
WaymoPremium lesson · Coding round
The 3 Waymo problems are below.
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
- A Premium questionCoding · Medium
Each with hints, the follow-up and a tested solution.
Get the Waymo questions$49 a year · all 100 companies · cancel anytime
From 20,000+ candidate reports, forum threads behind logins and write-ups in Chinese.
Waymo interview guideKnow what Waymo asks before you walk in.
29 coding · 3 system design · 15 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.