【Leetcode】674. Longest Continuous Increasing Subsequence

Given an unsorted array of integers, find the length of longest continuous increasing subsequence (subarray).

1 一个一个遍历,当当前元素大于之前的元素,则变量当前最长长度+1

2 每次都和total最长长度比较一下

3 当当前元素小于等于之前的元素,则变量当前最长长度置为1


【Leetcode】674. Longest Continuous Increasing Subsequence_第1张图片

你可能感兴趣的:(【Leetcode】674. Longest Continuous Increasing Subsequence)