怪奇物语

怪奇物语

首页 新随笔 联系 管理

2022年10月24日 #

摘要: const res = search([1, 2, 3, 4, 534, 34, 2], 34) console.log(res) function search(nums: number[], target: number): number | void { // [left,right] : 左 阅读全文
posted @ 2022-10-24 23:18 超级无敌美少男战士 阅读(206) 评论(0) 推荐(0)

摘要: 函数中代码的结构,三个循环结构嵌套一个分支结构 就是我们在看分支结构的时候,习惯了将分支结构看成一个线性的结构,也就是顺序结构,虽然执行顺序上类似线性结构,但是我们在看代码的要将其看成分支结构,如下图高亮的三个代码部分,三个高亮部分可以理解成三个并行的结构,打个比喻,一条河流走到这里,然后分成三条支 阅读全文
posted @ 2022-10-24 20:01 超级无敌美少男战士 阅读(43) 评论(0) 推荐(0)

摘要: https://www.shouce.ren/example/show/s/6869 阅读全文
posted @ 2022-10-24 15:40 超级无敌美少男战士 阅读(80) 评论(0) 推荐(0)

摘要: export {}; const result = letterCombinations("23"); console.log(result); function letterCombinations(digits: string) { const map:string[] = [ "", "", 阅读全文
posted @ 2022-10-24 11:23 超级无敌美少男战士 阅读(54) 评论(0) 推荐(0)