Question
Given a connected undirected graph with n nodes (0..n-1) and edges [u, v, w] where w (a positive integer) is the bandwidth/capacity of that link, return the maximum-bottleneck (widest) path capacity from src to dst: among all paths, the maximum over paths of the minimum edge weight along the path. Return -1 if dst is unreachable from src. You may assume src != dst. Assume 1 <= n <= 5000.
max_bottleneck_path(n: int, edges: list[list[int]], src: int, dst: int) → int[4,[[0,1,4],[1,3,2],[0,2,3],[2,3,3]],0,3]out3State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.