public static int findLengthOfLCIS (int [] nums) {
If (nums. Length==0)
return 0;
Int Max=0;
Int count=1;
for (int i=0; iIf (nums [I] count++;
} else {
Max=Math. Max (count, Max);
Count=1;
}
}
Max=Math. Max (count, Max);
return max;
}
Instead of returning to the list of the array subscript (index) on (in case of the same length return larger index array)
CodePudding user response:
Public static ListList
If (nums. Length & lt; 2) {
return null;
}
If (lnums. Length==2) {
If (nums [I]
Res. The add (1);
return res;
} else {
return res;
}
}
.
CodePudding user response:
No one can handle it?CodePudding user response:
Into a javascript is also ok