Skip to content

Commit 99c6a00

Browse files
committed
feat: update question 674
1 parent cd22dac commit 99c6a00

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

674.最长连续递增序列.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
* @return {number}
1111
*/
1212
var findLengthOfLCIS = function(nums) {
13-
if (nums.length === 0) {
14-
return 0;
15-
} else if (nums.length === 1) {
16-
return 1;
13+
if (nums.length <= 1) {
14+
return nums.length;
1715
}
1816

1917
let result = 0;

0 commit comments

Comments
 (0)