#3105

Longest Strictly Increasing or Strictly Decreasing Subarray

easy · 64.9% accepted · 660 likes · top 69%

array

⊣ practice⊣ open on leetcode ↗

Description

You are given an array of integers nums. Return the length of the longest subarray of nums which is either strictly increasing or strictly decreasing.

Solution