Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (subarray). The subsequence must be strictly increasing. A continuous increasing subsequence is defined by two indices l < r such that it is [nums[l], nums[l + 1], ..., nums[r - 1], nums[r]] and for each l <= i < r, nums[i] < nums[i + 1].
Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (subarray). The subsequence must be strictly increasing. A continuous increasing subsequence is defined by two indices l < r such that it is [nums[l], nums[l + 1], ..., nums[r - 1], nums[r]] and for each l <= i < r, nums[i] < nums[i + 1].
Example 1:
Input: {"nums":[1,3,5,4,7]}
Output: 3
Constraints:
1≤nums.length≤104
−109≤nums[i]≤109
Test Cases
Input (Stdin)
Expected Output (Stdout)
Execution Result
Run code to see results.
Input
arr ={"nums":[1,3,5,4,7]}
A single element is already an increasing run of length 1, so best = 1. The run starts at index 0.