Company: Visa
Difficulty: medium
City Route Bottleneck Score You are given n cities numbered from 1 through n and an array roads . Each entry roads[i] = [a, b, distance] describes a bidirectional road between cities a and b whose length is distance . The score of a path is the minimum road distance used anywhere along that path. Cities and roads may be visited more than once, so a path is any sequence of roads that starts at one city and ends at another, however many times it doubles back on itself. Return the minimum possible score of a path from city 1 to city n . At least one such path is guaranteed to exist. Function minScore(n: int, roads: int[][]) -> int Input Format The first line contains two space-separated integers n and m , the number of cities and the number of roads. Each of the next m lines contains three space-separated integers a , b and distance , describing one bidirectional road. Output Format Print a single integer, the minimum possible score of a path from city 1 to city n . Constraints 2 <=