Back to problems

Find the Longest Continuous Increasing Subsequence

Algorithm · Google · Easy

Given an integer array nums, find the length of the longest contiguous run whose values increase strictly from left to right. For a run starting at index i, every adjacent pair inside the run must satisfy nums[j] > nums[j - 1]. Return the length of that longest run. Implement longestContinuousIncreasingSubsequence(nums) -> integer. Example 1: Explanation: The run [4, 6, 8] has length 3; the only other run, [3, 5], is shorter. Example 2: Explanation: The longest run is [2, 4,…

Checking your access…