We’re preparing your current view and syncing the latest data.
You are given an integer n representing the number of cities numbered from 1 to n. You are also given a 2D array roads where each roads[i] = [ai, bi, distancei] indicates there is a bidirectional road between cities ai and bi with a distance equal to distancei. A path's score is defined as the minimum distance edge in the path. Your task is to find the minimum possible score of a path between city 1 and city n. A path is a sequence of cities connected by roads and may contain repeated cities or roads.
An integer representing the minimum score of a path between city 1 and city n.