Question
Given an undirected weighted graph with n nodes (0..n-1) and edges [u, v, w] with positive capacities w, find a path from a source to a destination that maximizes the minimum edge capacity along the path (the widest path / bottleneck). Return that maximum bottleneck value, or -1 if the destination is unreachable. If source equals destination, return 0. Constraints: 1 <= n <= 500.
max_bottleneck_path(n: int, edges: list[list[int]], src: int, dst: int) → int[3,[[0,1,1],[1,2,5],[0,2,3]],0,2]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.