02 2020 档案

摘要:// 方式一 let fibnacci = n => n <=0 ? 0 : n ==1 ? 1 : fibnacci(n -2) + fibnacci(n -1);//时间复杂度 O(logn) // 方式二 let fib = n => { if(n==0){ return 0; } let a 阅读全文
posted @ 2020-02-15 18:40 Nextfuture 阅读(196) 评论(0) 推荐(0)
摘要:1 function strToNum(a){ 2 let chars = a.split("").map(e => e.charCodeAt(0) - "0".charCodeAt(0)); 3 let n = 0; 4 5 for(var char of chars){ 6 n *= 10; 7 阅读全文
posted @ 2020-02-04 10:41 Nextfuture 阅读(307) 评论(0) 推荐(0)