Checking Your Route π
A ride hailing company sometimes travels between cities. To avoid delays, a driver first checks for the shortest routes. There is a map of the cities and their bidirectional roads represented by a graph of nodes and edges. Determine the paths from the first node to the last node and choose the shortest length. Now select all paths that are that length. These are the shortest paths. Return an array of strings, one for each road in order, where the value is YES if the road is along any shortest path or NO if it is not. The roads or edges are named using their 1-based index within the input arrays.
Complete the function classifyEdges in the editor.
classifyEdges has the following parameter(s):
int g_nodes: an integer, the num of nodesint g_from[g_edges]: an array of integers, the start g_nodes for each roadint g_to[g_edges]: an array of integers, the end g_nodes for each roadint g_weight[g_edges]: an array of integers, the lengths of each road1Example 1

Constraints
Limits and guarantees your solution can rely on.
An unknown urban legend π₯²