Minimum Road Score on a Trip Between Two Cities

Asked at Visa · Coding Questions · Difficulty: Medium · Last asked Jul 20, 2026

A country has `n` cities numbered from `1` to `n`, connected by bidirectional roads. Each road has a distance. The score of a path between two cities is the smallest road distance on that path. You want the lowest score you can get on a trip from city `1` to city `n`.

Loading the problem…