Question
An uptime checker probes a site once a minute and stores the results in order as a list of strings, each "up" or "down". For the monthly report you need the number of distinct outages: an outage is a maximal run of consecutive "down" results — it starts when a "down" follows an "up" (or begins the list) and ends at the next "up" (or the end of the list). Return the number of outages; an empty list has zero.
count_outages(statuses: list[str]) → int[["up","down","down","up","down"]]out2State 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.