Here is the code:
class Solution {
public int findLengthOfLCIS(int[] nums) {
if(nums.length==0)
{
return 0;
}
int max = 0;
int count=0;
for(int i =0;i<nums.length-1;i++)
{
if(nums[i]<nums[i+1])
{
count++;
}
else
{
count=0;
}
max = max>count?max:count;
}
return max+1;
}
}
Popular Posts
-
Here is the code: // => Brute Force Solution: O(m* n) static long arrayManipulation(int n, int[][] queries) { ...
-
Whatever it is one fine day everyone on this planet who are born have to die for sure. When you are close ones are with you, you wont know ...
-
HTML: <div class="outer-container"> <div class="inner-container"> <div class="t...
No comments:
Post a Comment