There is an undirected graph with n nodes labeled from n edges where edges[i] u_i, v_i, length_i u_i and node v_i that takes length_i units of time to traverse.
You are also given an integer array disappear of length n, where disappear[i] represents the time at which node i disappears from the graph. Once a node disappears, it cannot be visited or traversed.
Starting at node
Return an array answer of size n, where answer[i] is the minimum time required to visit node i, or i cannot be visited before it disappears.
Constraints:
n
edges.length
edges[i] u_i, v_i, length_i
u_i, v_i n
length_i
disappear.length n
disappear[i]
There is an undirected graph with n nodes labeled from n edges where edges[i] u_i, v_i, length_i u_i and node v_i that takes length_i units of time to traverse.
You are also given an integer array disappear of length n, where disappear[i] represents the time at which node i disappears from the graph. Once a node disappears, it cannot be visited or traversed.
Starting at node
Return an array answer of size n, where answer[i] is the minimum time required to visit node i, or i cannot be visited before it disappears.
Constraints:
n
edges.length
edges[i] u_i, v_i, length_i
u_i, v_i n
length_i
disappear.length n
disappear[i]