#3105

Longest Strictly Increasing or Strictly Decreasing Subarray

pupil · 335 · lc easy +22 · 64.9% accepted · 660 likes · top 69%

Description

Given an integer array nums, return the length of the longest contiguous subarray that is either strictly increasing or strictly decreasing.

Code

1
2
3