LeetCode
Longest Turbulent Subarray
Click
here
for an explanation.