博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
2020-11-11&L——prototype,__proto__ && 674. 最长连续递增序列
阅读量:3957 次
发布时间:2019-05-24

本文共 527 字,大约阅读时间需要 1 分钟。

function Bar(){}console.log(Bar.prototype === Function)console.log(Bar.prototype === Function.prototype)console.log(Bar.__proto__ === Function.prototype)console.log(new Bar().__proto__ === Bar.prototype)

 

function findLengthOfLCIS(nums){  let len = nums.length;  if(len == 0){    return 0;  }  let maxSub = 1;  let subLen = 1;  for(let i = 0; i < len-1; i++){    if(nums[i] < nums[i+1]){      subLen++;    }else{      subLen = 1;    }    if(subLen > maxSub){      maxSub = subLen;    }  }  return maxSub;}var nums = [1,2,1,2,3];

 

 

转载地址:http://ohtzi.baihongyu.com/

你可能感兴趣的文章
牛客练习赛50,B tokitsukaze and Hash Table(STL+输入输出挂)
查看>>
POJ3728,The merchant(倍增LCA+分治)
查看>>
2019 ICPC Malaysia National,E. Optimal Slots(01背包变形)
查看>>
洛谷P1638 逛画展(双向队列)
查看>>
牛客练习赛51,D(二分图匹配)
查看>>
POJ2892,Tunnel Warfare(线段树维护连续区间)
查看>>
POJ3468,A Simple Problem with Integers(线段树-区间查询-区间更新)
查看>>
快速幂(递归)
查看>>
CodeForces 1101A Minimum Integer(思维)
查看>>
CodeForces 1102A Integer Sequence Dividing(思维)
查看>>
CodeForces 1087B Div Times Mod(思维)
查看>>
杭电ACM——4310,Hero(贪心)
查看>>
杭电ACM——1789,Doing Homework Again(贪心)
查看>>
北大ACM——2782,Bin Packing(贪心)
查看>>
北大ACM——4014,Dice(贪心)
查看>>
杭电ACM——4864,Task(贪心)
查看>>
北大ACM——3176,Cow Bowling(动态规划)
查看>>
北大ACM——2229,Sumsets(DP或思维)
查看>>
北大ACM——3186,Treats For The Cows(DP)
查看>>
杭电ACM——蝎子搬新家(贪心)
查看>>