Eagle233-Blog

Eagle233-Blog

dev-mdsuper


[Algorithms] 待复习


Categories Algorithms | Tags

20250407// 20250414 !// 20250421LeetCode 977. 有序数组的平方 // 20250414 !...


[Algorithms] LeetCode 206. 反转链表


Categories Algorithms LinkedList | Tags

来源:代码随想录 LeetCode 206. 反转链表 双指针这题又忘记怎么做了。只需要cur pre两个指针,一开始各自指向head nullptr. /** * Definition ...


[Algorithms] LeetCode 707. 设计链表


Categories Algorithms LinkedList | Tags

来源:代码随想录 LeetCode 707. 设计链表 单链表链表问题不大,cpp语法问题很大,构造函数都不会写。MyLinkedList是构造函数,变量不用类型是因为在私有里面已经声明过了...


[Algorithms] LeetCode 203. 移除链表元素


Categories Algorithms LinkedList | Tags

来源:代码随想录 LeetCode 203. 移除链表元素 虚拟头节点 Dummy Head这题没一遍过,因为并不是每次循环都要把指针指向下一个节点,如果进行了删除操作,那么下一个节点还需要...


[Algorithms] KamaCoder 44. 开发商购买土地(第五期模拟笔试)


Categories Algorithms Array | Tags

来源:代码随想录 KamaCoder 44. 开发商购买土地(第五期模拟笔试) 前缀和Plus。有两种划分,那么分别开两个数组,把二维数组从行列两个方向压缩成列行和,然后再用前缀和。观察到求...


[Algorithms] KamaCoder 58. 区间和(第九期模拟笔试)


Categories Algorithms Array | Tags

来源:代码随想录 KamaCoder 58. 区间和(第九期模拟笔试) 前缀和的思想。 #include <bits/stdc++.h> using namespace std; ...


[Algorithms] LeetCode 59. 螺旋矩阵 II


Categories Algorithms Array | Tags

来源:代码随想录 LeetCode 59. 螺旋矩阵 II 考察基本功啊,区间统一左闭右开,最后记得处理n为奇数的情况。 class Solution { public: ...


[Algorithms] LeetCode 209. 长度最小的子数组


Categories Algorithms Array | Tags

来源:代码随想录 LeetCode 209. 长度最小的子数组 滑动窗口,注意指针什么时候要++。指针最好不要定义在for循环里面,有时候要回去–,很乱,不如直接手动++。 三刷发现忘记左边...


[Algorithms] LeetCode 977. 有序数组的平方


Categories Algorithms Array | Tags

来源:代码随想录 LeetCode 977. 有序数组的平方 双指针法,倒序写进结果数组。 四刷:指针可以取等,为什么? class Solution { public: ...


[Algorithms] LeetCode 27. 移除元素


Categories Algorithms Array | Tags

来源:代码随想录 LeetCode 27. 移除元素 暴力解法这边先要初始化一个size变量,原因是我们需要一直变动size的大小,不希望更改实际size之外的数组部分。 class Sol...



© 2025 Eagle233
Powered By Hexo & Theme mdsuper
Search