674 longest continuous increasing subsequence
·data-structure-and-algorithm
#dynamic-programming
674. 最长连续递增序列
go:
func findLengthOfLCIS(nums []int) int {
count, pre := 1, nums[0]
ans := 1
for _, v := range nums {
if pre < v {
count++
} else {
count = 1
}
if ans < count {
ans = count
}
pre = v
}
return ans
}