leetcode——数组类知识点及题型总结
很多题都能靠暴力解法 但是通常都会有时间复杂度或者空间复杂度超出限制的情况,因此都不予讨论
k-sum类 如 第一题 twosum 计算数组中的哪些值得和能等于给定的target 有时候题目中会带有是否能重复使用一个值的限制
- hash 遍历数组 将每一个值存入hash表中 并检测hash表中是否有 target-nums[i] 的结果 如果有 则结果就是 i 和对应的hash表中的值 时间复杂度O(n)
- two-points
区间类
- 子数组类
welcome to wonderland
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent: meta: false pages: false posts: title: true date: true path: true text: false raw: false content: false slug: false updated: false comments: false link: false permalink: false excerpt: false categories: false tags: true