Categorygithub.com/szhou12/leetcode-goleetcode0674-Longest-Continuous-Increasing-Subsequence
package
0.0.0-20241220224003-b7cf03a90b2b
Repository: https://github.com/szhou12/leetcode-go.git
Documentation: pkg.go.dev

# README

674. Longest Continuous Increasing Subsequence

Solution idea

Define $DP[i] = $ longest length of the subarray ending at i

Base case: $DP[0] = 1$

Recurrence:

$DP[i] = DP[i-1] + 1$ if $nums[i] > nums[i-1]$

$DP[i] = 1$ otherwise

Time complexity = $O(n)$