You are given an integer n representing the number of nodes in a connected undirected graph, with nodes labeled from n edges, where edges[i] = [u_i, v_i, w_i] denotes an undirected edge connecting node u_i and node v_i with weight w_i.
The cost of a path between node n
Return the minimum possible cost of a path from node n
Constraints:
n
n edges.length
edges[i] = [u_i, v_i, w_i]
u_i v_i n
[u_i, v_i] != [u_j, v_j] for all
w_i
The graph is connected.
You are given an integer n representing the number of nodes in a connected undirected graph, with nodes labeled from n edges, where edges[i] = [u_i, v_i, w_i] denotes an undirected edge connecting node u_i and node v_i with weight w_i.
The cost of a path between node n
Return the minimum possible cost of a path from node n
Constraints:
n
n edges.length
edges[i] = [u_i, v_i, w_i]
u_i v_i n
[u_i, v_i] != [u_j, v_j] for all
w_i
The graph is connected.