LeetCode | 在排序数组中查找元素的第一个和最后一个位置
LeetCode 在排序数组中查找元素的第一个和最后一个位置题解:复用 lower_bound,两次二分定位左右边界。
Cover Image of the Post
LeetCode | 搜索二维矩阵
LeetCode 搜索二维矩阵题解:把矩阵看作一维数组做二分,或者先定位行再二分查找。
Cover Image of the Post
LeetCode | 搜索插入位置
LeetCode 搜索插入位置题解:用二分查找在升序数组中找到目标位置或插入位置。
Cover Image of the Post
LeetCode | 二叉树的最大深度
LeetCode 二叉树的最大深度题解:用递归计算左右子树深度,并返回更深一侧加一。
Cover Image of the Post
LeetCode | 接雨水
LeetCode 接雨水题解:理解每个位置的左右挡板,用双指针在线性时间内计算总积水量。
Cover Image of the Post
LeetCode | 最长连续序列
LeetCode 最长连续序列题解:使用哈希集合只从连续序列起点开始统计最长长度。
Cover Image of the Post
LeetCode | 盛最多水的容器
LeetCode 盛最多水的容器题解:使用双指针从两端向中间移动,计算能够装下的最大水量。
Cover Image of the Post
LeetCode | 字母异位词分组
LeetCode 字母异位词分组题解:使用排序后的字符串或字符计数元组作为哈希表 key。
Cover Image of the Post
LeetCode | 矩阵置零
LeetCode 矩阵置零题解:使用行列标记数组记录需要清零的位置,再统一修改原矩阵。
Cover Image of the Post
LeetCode | 无重复字符的最长子串
LeetCode 无重复字符的最长子串题解:使用哈希集合与滑动窗口维护不含重复字符的连续片段。
Cover Image of the Post
LeetCode | 二叉树的中序遍历
LeetCode 二叉树的中序遍历题解:使用递归法和迭代栈法完成左、根、右遍历。
Cover Image of the Post
LeetCode | 相交链表
LeetCode 相交链表题解:使用哈希集合或长度差对齐法找到两个链表的相交起始节点。
Cover Image of the Post
访客信息
--°天气加载中

正在获取所在地区…

💨 风力--
💧 湿度--

正在读取天气

Profile Image of the Author
平昊阳
乘长风,破巨浪, 展鸿图于未央!
公告
欢迎来到我的个人博客!欢迎关注交流吖!
更多相关公告,见
「社交-留言」。
音乐
封面

音乐

暂未播放

0:000:00
暂无歌词
站点统计
文章
448
分类
29
标签
451
总字数
6,178,652
运行时长
0 天
最后活动
0 天前
最新动态

文章目录