Shortest Item-to-Item Travel Distance Across Pins
Asked at Pinterest · Coding Questions · Difficulty: Medium · Last asked Nov 20, 2025
A collection of pins, such as boards on an image-sharing site, each holds a list of items. Two items that sit together in at least one pin are related. Given two items, find how many steps it takes to get from one to the other by moving between related items.
Loading the problem…