Javascript O(n)
\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar findLengthOfLCIS = function(nums) {\n  let max = 0;\n  let curr = 0;\n  let prev = -Infinity;\n 
```\n/**\n * @param {number[]} nums\n * @return {number}\n */\nvar findLengthOfLCIS = function(nums) {\n  let max = 0;\n  let curr = 0;\n  let prev = -Infinity;\n  for (let n of nums){\n    if(n > prev){\n      max = Math.max(max, ++curr)      \n    }else{\n      curr = 1;\n    }\n    prev = n\n  }\n  return max\n};\n```
['JavaScript']