Leetcode, Python, Solutions, Problem Solving, Cruio.
are no repeated edges and no self-loops in the graph at any point. At most 100 calls will be made for addEdge. At most 100 calls will be made for shortestPath. SOLUTION import heapq class Graph: def __init__(self, n: int, edges: List[List[int]]): self.adj_list=[[] for _ in range(n)] for u,v,w in