Question
To sanity-check an experiment plan, your team replays it against historical traffic: each replay simulates the full experiment and records the measured uplift in basis points (possibly negative). The plan's empirical power is the share of replays whose uplift reached the minimum detectable effect. Given diffs_bps, the list of replay results, and an integer mde_bps, return floor(100 * qualifying / total) where qualifying counts entries with diffs_bps[i] >= mde_bps. If there are no replays, return -1. Example: diffs_bps = [120, -40, 300, 90], mde_bps = 100 returns 50 (2 of 4 qualify).
replay_power_pct(diffs_bps: list[int], mde_bps: int) → int[[120,-40,300,90],100]out50State 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.