Service failure blast radius
A release tool keeps the call graph of a service fleet. Each entry in `calls` is a string like "web>auth", meaning the service named on the left calls the one named on the right, so the left service stops working when the right one does. On-call has just taken `failed` out of rotation, and every service that reaches it through a chain of calls goes dark with it. Return that blast radius: the affected service names, sorted alphabetically. Leave `failed` itself out of the answer, even when a chain of calls loops back to it. The fleet may contain cycles, repeated entries and a service that calls itself, and `failed` may not appear in `calls` at all.
outage_blast_radius(calls: list[str], failed: str) → list[str][["web>auth","auth>db","billing>db","web>cdn"],"db"]out["auth","billing","web"][["web>auth","auth>db","billing>db","web>cdn"],"cdn"]out["web"][[],"db"]out[]State 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.
[["web>auth","auth>db","billing>db","web>cdn"],"db"]["auth","billing","web"]not run yetsample[["web>auth","auth>db","billing>db","web>cdn"],"cdn"]["web"]not run yetsample[[],"db"][]not run yetsample