Question
A network has n nodes (0..n-1) and undirected links; edges[i] = [a, b] with success probability probs[i] (a float in [0,1]) that a message survives that link. The reliability of a path is the product of its link probabilities. Return the maximum reliability of any path from start to end, or 0.0 if none exists. start may equal end (reliability 1.0). There are at most 10^4 edges.
max_reliability(n: int, edges: list[list[int]], probs: list[float], start: int, end: int) → float[3,[[0,1],[1,2],[0,2]],[0.5,0.5,0.2],0,2]out0.25State 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.