← All problems
Medium · Greedy
Longest Turbulent Subarray
Find the longest contiguous run of alternating greater-than and less-than comparisons.
Full problem and submission ↗Find the longest contiguous run of alternating greater-than and less-than comparisons.
Full problem and submission ↗