Level: Mid-Level
Round: Phone Screen · Type: Coding · Difficulty: 6/10 · Duration: 60 min · Interviewer: Neutral
Topics: Graph Traversal, Depth-First Search, Breadth-First Search
Location: San Francisco Bay Area
Interview date: 2026-05-15
Got offer: False
I had a phone screen where I was asked to find the fastest and cheapest transportation mode from a start to destination point in a city grid.
The problem was to find the fastest mode of transportation to commute from 'S' to 'D' in a 2D city grid, minimizing commute time and cost, given time and cost matrices for available transportation modes. Only horizontal and vertical movement were allowed. I initially tried to solve it with DFS and a recursive function, but I didn't finish during the interview. After the interview, I realized BFS with a deque (in Python) would be a better approach, and I implemented it successfully.