Code Room
CodingEasycod-g1481
Subject Dynamic programming 1dLevel Entry–Mid~10 minCommon in Algorithms & data structures interviewsIndustries Software development

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.

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.

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.

Run or narrate your approach, then ask the coach.