Coding Challenge · INTERMEDIATE
Given a weighted undirected graph represented by an integer n denoting the number of nodes and an array edges where each element is a tuple u, v, w representing an edge between nodes u and v with weight w, find the shortest path from node 0 to node n-1. Return the total weight of the shortest path. If no path exists, r…