leetle

Daily challenge for 2026-05-28

513. Max Consecutive Positive Temperatures

Given an array of integers representing daily temperatures, find the maximum number of consecutive days where the temperature was strictly positive (> 0).

Example:
Input: temps = [1, 2, -1, 3, 4, 5, 0]
Output: 3
Explanation: The longest sequence of positive temperatures is [3, 4, 5], which has a length of 3.

Run this challenge interactively in Python or JavaScript when the app loads.