leetle

Daily challenge for 2026-09-11

619. Longest Contiguous Quiet Period

You are given an array of integers noiseLevels representing the noise level recorded every minute, and an integer threshold. A quiet period is a contiguous sequence of minutes where every recorded noise level is strictly less than threshold. Return the length of the longest quiet period, or 0 if there is none.

Example:
Input: noiseLevels = [45,30,20,50,25,28,35,60], threshold = 40
Output: 3
Explanation: The longest quiet period is [25,28,35], which lasts 3 minutes. The earlier quiet period [30,20] lasts only 2 minutes.

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