Find Minimum City Hops
Amazon interview questions · Medium · Coding round · 6 tests
In Amazon's transportation network, every city is identified by a code made of 3 lowercase characters.
A direct link exists between two cities when their codes differ at exactly one position.
Interface
minimumCityHops(
startCity: string,
endCity: string,
cities: string[],
): number
Rules
Run your code with Ctrl+Enter to see results.