Machine Learning Engineer • Junior-Level
Machine Learning Engineer • Junior-Level
High QualityPrep Other Coding Questions Asked by Waymo
Continue with targeted prep from Waymo's coding question bank.
Interview Summary
The technical phone screen featured a shortest-path problem involving a vehicle navigating a two-dimensional road network with obstacles and traffic lights.
Unlike a standard grid shortest-path problem, this question introduced time-dependent movement restrictions. Some cells contained traffic lights that turned green periodically, requiring the vehicle to wait before passing through them. The goal was to determine the minimum travel time from a starting location to a destination while accounting for both movement time and traffic light delays.
Interview Details
Coding: Shortest Travel Time in a Grid with Traffic Lights
You are given an m × n two-dimensional grid representing a road network. Each cell represents a location in the network and contains one of three values:
0— Free Road: The vehicle can pass through this cell without additional restrictions.1— Obstacle: The vehicle cannot enter or pass through this cell.2— Traffic Light: The vehicle can pass through this cell only when the traffic light is green.
Traffic lights turn green periodically, every T units of time. You are also given the vehicle's starting position and destination:
(startRow, startCol)— Starting location.(endRow, endCol)— Destination.
The task is to determine the minimum time required for the vehicle to reach the destination.
Movement Rules
The vehicle can move between adjacent cells in four directions:
Unlock Full Details
Create a free account to unlock this interview experience report.