An undirected weighted graph has n nodes and edges[i] = [u, v, w] with positive integer weights. Return the length of the second shortest walk from src to dst: the smallest length that is strictly greater than the shortest length. A walk may revisit nodes and reuse edges. Return -1 if dst cannot be reached.
- A
MinHeap class is provided: push([priority, ...payload]) and pop() return the entry with the smallest first element src and dst are different nodes- Two walks of equal length count once
- Keep two distances per node