Given an integer array nums, return the maximum length of a contiguous subarray that is either strictly increasing or strictly decreasing.
A subarray is strictly increasing if every element is greater than the previous element. A subarray is strictly decreasing if every element is less than the previous element.
Constraints:
nums.length
nums[i]
Given an integer array nums, return the maximum length of a contiguous subarray that is either strictly increasing or strictly decreasing.
A subarray is strictly increasing if every element is greater than the previous element. A subarray is strictly decreasing if every element is less than the previous element.
Constraints:
nums.length
nums[i]