Level: Mid-Level
Round: Phone Screen · Type: Coding · Difficulty: 6/10 · Duration: 60 min · Interviewer: Unfriendly
Topics: Graph Theory, Shortest Path
Location: San Francisco Bay Area
Interview date: 2025-11-18
I interviewed with a male engineer. The question involved calculating the shortest distance between pins on different boards. Given two pins, determine if they are related. Given two pins, calculate their shortest distance. Given two boards, calculate their shortest distance using any pin.
The interview question involved calculating distances between pins on different boards. The boards and pins were:
Board: Travel, Pins: Mountain, Lake, Inn Board: Decoration, Pins: House, Stone Pond, Inn Board: Graffiti, Pins: Picasso, Lake Board: Car, Pins: BYD, Xiaopeng
The distances were:
Distance(Mountain, Lake) = 1 Distance(Mountain, House) = 2 Distance(Stone Pond, Picasso) = 3
The problem required implementing functions to:
Determine if two given pins are related. Calculate the shortest distance between two given pins. Calculate the shortest distance between two given boards, using any of their pins.