3123. Find Edges in Shortest Paths
You are given an undirected weighted graph of
nnodes numbered from 0 ton - 1. The graph consists ofmedges represented by a 2D arrayedges, whereedges[i] = [ai, bi, wi]indicates that there is an edge between nodesaiandbiwith weightwi.Consider all the shortest paths from node 0 to node
n - 1in the graph. You need to find a boolean arrayanswerwhereanswer[i]istrueif the edgeedges[i]is part of at least one shortest path. Otherwise,answer[i]isfalse.Return the array
answer.Note that the graph may not be connected.