LeetCode算法題解 674-最長連續遞增序列

題目描述web 題解:數組 遍歷數組,用一個maxLen記錄最長遞增連續序列的長度,當前的數nums[i]大於前一個數pre,就curLen++, 而後記錄下當前的最大長度,若是不大於就將curLen置爲1。svg 代碼:code class Solution { public: int findLengthOfLCIS(vector<int>& nums) { int
相關文章
相關標籤/搜索