Code RoomLongest warming streak
EasyPrep Room Coding #684

Longest warming streak

CodingAlgorithms & data structuresEntry–Mid~10 min

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.

Implement
longest_warming_streak(temps: list[int]) → int
Examples
in[[1,2,3,2,3,4,5]]out4
in[[5,5,5]]out1
What a strong answer looks like

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.

0:00 of about 10 min
InputExpectedGot
[[1,2,3,2,3,4,5]]4not run yetsample
[[5,5,5]]1not run yetsample