# RyanTing 的 leetcode 题解
# 写在前面
这里是 RyanTing 的 leetcode (opens new window) 刷题的笔记。
包含了已经提交的题目的代码、笔记。有些笔记较为详细,有些较为简略。
在这些笔记中,很多内容是参考、摘录、再创作了很多 leetcode (opens new window) 用户和网络上的内容,在此向编写详实的笔记作者致敬。 引用部分在笔记中做出了指示,再次感谢这些作者的无私分享和精彩解析。
本人水平有限,在编写笔记和编码过程中难免会有错误,望读者海涵。
本人常用的语言为 Java 语言,其他语言鲜有涉猎,如果您对其他语言熟悉,也可以提交其他语言版本的代码 PR,在此表示感谢。
如果您在阅读中,发现了图片缺失,链接错误等情况,欢迎提交 issue。
# Tag 笔记导航
# Tag 笔记导航的说明
- 包含超链接,点击链接可以跳转到题目或者笔记。
- 标注难度级别。
# Array 数组 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| 15 . 三数之和 (opens new window) | 15 . 三数之和 (opens new window) | Medium | 排序;双指针 |
| 16 . 最接近的三数之和 (opens new window) | 16 . 最接近的三数之和 (opens new window) | Medium | 排序;双指针 |
| 54 . 螺旋矩阵 (opens new window) | 54 . 螺旋矩阵 (opens new window) | Medium | 蛇形填数 |
| 54 . 螺旋矩阵 2 (opens new window) | 54 . 螺旋矩阵 2 (opens new window) | Medium | 蛇形填数 |
| 238 . 除自身以外的数组的乘积 (opens new window) | 238 . 除自身以外的数组的乘积 (opens new window) | Medium | 前缀积;后缀积 |
| 628 . 三个数的最大乘积 (opens new window) | 628 . 三个数的最大乘积 (opens new window) | Easy | 分情况讨论;多个数字交换 |
# String 字符串 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| 125 . 验证回文串 (opens new window) | 125 . 验证回文串 (opens new window) | Easy | 双指针;简化情况 |
| 383 . 赎金信 (opens new window) | 383 . 赎金信 (opens new window) | Easy | 计数器 counter |
| 387 . 字符串中的第一个唯一字符 (opens new window) | 387 . 字符串中的第一个唯一字符 (opens new window) | Easy | 计数器 counter |
| 680 . 验证回文字符串2 (opens new window) | 680 . 验证回文字符串2 (opens new window) | Easy | 双指针;覆写思想 |
# Two Pointers 双指针 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| 88 . 合并两个有序数组 (opens new window) | 88 . 合并两个有序数组 (opens new window) | Medium | 双指针;覆写思想 |
| 986 . 区间列表的交集 (opens new window) | 986 . 区间列表的交集 (opens new window) | Medium | 双指针;“坐标系”恒定 |
| 713 . 乘积小于K的子数组 (opens new window) | 713 . 乘积小于K的子数组 (opens new window) | Medium | 双指针 |
# Tree 树 (opens new window)
# Dynamic Programming 动态规划 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| 53 . 最大子序和 (opens new window) | 53 . 最大子序和 (opens new window) | Easy | |
| 152 . 乘积最大子数组 (opens new window) | 152 . 乘积最大子数组 (opens new window) | Medium | |
# Graph 图 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| 997 . 找到小镇的法官 (opens new window) | 997 . 找到小镇的法官 (opens new window) | Easy | |
# HashMap 哈希表 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| 347 . 前 K 高频元素 (opens new window) | 347 . 前 K 高频元素 (opens new window) | Medium | |
| 451 . 根据字符出现的频率排序 (opens new window) | 451 . 根据字符出现的频率排序 (opens new window) | Medium | |
# Math 数学 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| Easy | |||
| Medium | |||
# Greedy 贪心 (opens new window)
| 题目名(点击跳转题目) | 笔记链接(点击跳转链接) | 难度评级 | 关键词 |
|---|---|---|---|
| 1029 . 两地调度之优化算法 (opens new window) | 1029 . 两地调度之优化算法 (opens new window) | Easy | |
# Bit Manipulation 位操作 (opens new window)
# 优秀个人题解 站点 List
# labuladong 的算法小抄
笔记 URL :https://labuladong.gitbook.io/algo/
非常实用主义的笔记,首先关注整体框架,理清思路,选择性忽略细节。
刷题向笔记,作者写道:“非 ACM,野路子出身。大部分人学习算法和数据结构,就是为了刷题,巩固计算机知识。别死磕 数学 和 证明。”
# liweiwei1419 的 算法与数据结构入门教程
笔记 URL :https://liweiwei1419.gitee.io/leetcode-algo/#indexCard