InterviewLegend

Hash Maps and Counting

Alex Chen40 min readUpdated 38 real interview reports

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.

  1. A Premium questionCoding · Medium
  2. A Premium questionCoding · Medium
  3. 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.

Had your Waymo interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Waymo interview guide

Know what Waymo asks before you walk in.

29 coding · 3 system design · 15 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.