Skip to content

Practice Longest Continuous Increasing Subsequence

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#674
LeetCode Problem

Longest Continuous Increasing Subsequence

Problem Statement

Given an unsorted array of integers nums, return the length of the longest continuous increasing subsequence (i.e. subarray). The subsequence must be strictly increasing. A continuous increasing subsequence is defined by two indices l and r (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].

Source: Longest Continuous Increasing Subsequence on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
nums = [1,3,5,4,7]
Output
3

# Example 2

Input
nums = [2,2,2,2,2]
Output
1

Constraints

1 <= nums.length <= 10^4
-10^9 <= nums[i] <= 10^9

Related LeetCode Problems

Practice more problems similar to Longest Continuous Increasing Subsequence.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.