![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前缀和
文章平均质量分 90
再加一份肉
这个作者很懒,什么都没留下…
展开
-
20210603 每日一题 连续数组
20210603 每日一题 连续数组题目代码方法一:前缀和+哈希表分析代码要点复杂度分析拓展 题目 题目链接 代码 class Solution { public: int findMaxLength(vector<int>& nums) { } }; 方法一:前缀和+哈希表 分析 朴素思路:当数组 numsnumsnums 的长度为 nnn 时,使用 O(n2)O(n^2)O(n2)的时间遍历遍历数组 numsnumsnums 的全部子数组,对于每个子数组需要 O(原创 2021-06-16 20:22:27 · 78 阅读 · 0 评论 -
20210602 每日一题 连续的子数组和
20210601 每日一题题目代码方法一:前缀和分析代码要点复杂度分析拓展 题目 题目链接 代码 class Solution { public: vector<bool> canEat(vector<int>& candiesCount, vector<vector<int>>& queries) { } }; 方法一:前缀和 分析 每天吃糖果的落在区间: [1,dailyCap][1, dailyCap][1,daily原创 2021-06-14 15:43:36 · 54 阅读 · 0 评论 -
20210601 每日一题 你能在你最喜欢的那天吃到你最喜欢的糖果吗?
20210601 每日一题题目题解前缀和拓展 题目 题目链接 题解 前缀和 拓展原创 2021-06-12 18:59:09 · 80 阅读 · 0 评论