Back to problems

Minimize Path Value

Algorithm · Palantir · Hard

You are given an undirected weighted graph with N vertices (numbered 1 to N) and M edges. Each edge connects two vertices and has a positive integer weight. The "bottleneck cost" of a path from one vertex to another is the largest weight among all edges on that path. For a specified starting vertex source and target vertex destination, determine the minimum possible bottleneck cost over all paths that connect them. If no path exists between source and destination, return -1.…

Loading the rest of the question…