The Pinterest technical phone screen used a graph-style problem based on topic boards and Pins. The input describes which Pins belong to each topic, together with a starting Pin and a destination Pin. The task is to determine the shortest valid connection between the two Pins according to the board-overlap rules.
Interview Details
Coding — Shortest Connection Between Pins
The function receives three inputs. The first maps each topic board to the Pins associated with that topic. For example, a rewritten dataset could look like:
Travel:
Yosemite
Boston
Seattle
Food:
Boston
Ramen
Tacos
Sports:
Tennis
Soccer
Yosemite
Travel:
Yosemite
Boston
Seattle
Food:
Boston
Ramen
Tacos
Sports:
Tennis
Soccer
Yosemite
The second input
Unlock Full Details
Create a free account to unlock this interview experience report.