Question
A weather station reports one temperature reading per hour as a list of integers. A warming streak is a run of consecutive readings where each one is strictly higher than the reading before it. Return the length of the longest warming streak, counted in number of readings. A single reading is a streak of length 1, and an empty list returns 0. For example, [1, 2, 3, 2, 3, 4, 5] has a longest streak of 4.
longest_warming_streak(temps: list[int]) → int[[1,2,3,2,3,4,5]]out4[[5,5,5]]out1State 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.