Question
A coordinator runs two-phase commit across participants. In the prepare phase each participant votes: 'yes', 'no', or 'timeout' (no reply within the window). The protocol commits ONLY if every participant voted 'yes'; if any participant voted 'no' or 'timeout', the coordinator aborts. Given the list of votes, return 'commit' or 'abort'. An empty participant set commits (vacuously, nothing to coordinate).
two_phase_decision(votes: list[str]) → str[["yes","yes","yes"]]out"commit"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.
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.