Available question text
Find the length of the longest contiguous subarray where the sign of each adjacent comparison strictly alternates (i.e., > then < then > ... or < then > then < ...). Note equal adjacent values break the turbulence so the subarray must consist of strictly alternating up/down comparisons.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 978. Longest Turbulent Subarray
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source