[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-584":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":38,"readmeContent":39,"aiSummary":40,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":41,"discoverSource":42},584,"leetcode","azl397985856\u002Fleetcode","azl397985856","LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解，记录自己的leetcode解题之路。)","https:\u002F\u002Fleetcode-solution-leetcode-pp.gitbook.io\u002Fleetcode-solution\u002F",null,"JavaScript",55758,9410,1317,8,0,2,14,45,"Other",false,"master",true,[25,26,27,28,29,30,31,32,33,34,5,35,36,37],"algo","algorithm","algorithms","algorithms-datastructures","computer-science","cpp","data-structures","interview","java","javascript","leetcode-solutions","python","tree","2026-06-12 02:00:15","# LeetCode\n\n[![Travis](https:\u002F\u002Fp.ipic.vip\u002Fk4pv1r.jpg)]() [![Travis](https:\u002F\u002Fp.ipic.vip\u002F32nfgh.jpg)]() [![Travis](https:\u002F\u002Fp.ipic.vip\u002F4a36ao.jpg)]() [![Travis](https:\u002F\u002Fp.ipic.vip\u002Ffd1f82.jpg)]() [![Travis](https:\u002F\u002Fp.ipic.vip\u002Fmhz5uy.jpg)]() [![Travis](https:\u002F\u002Fp.ipic.vip\u002Fgp1hvz.jpg)]()\n\n[![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWeChat-微信群-brightgreen)](#哪里能找到我) [![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F公众号-力扣加加-blueviolet)](#哪里能找到我) [![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FJuejin-掘金-blue)](https:\u002F\u002Fp.ipic.vip\u002Fpj4t8y.jpg) [![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FZhihu-知乎-blue)](https:\u002F\u002Fp.ipic.vip\u002Fn9co7k.jpg) [![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fbilili-哔哩哔哩-ff69b4)](https:\u002F\u002Fp.ipic.vip\u002Fm7g3to.jpg)\n\n简体中文 | [English](.\u002FREADME.en.md)\n\n---\n\n我们的 slogan 是： **只有熟练掌握基础的数据结构与算法，才能对复杂问题迎刃有余。**\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=azl397985856\u002Fleetcode&type=Date)](https:\u002F\u002Fstar-history.com\u002F#azl397985856\u002Fleetcode&Date)\n\n## 🔥🔥🔥 我的《算法通关之路》出版了 🔥🔥🔥\n\n我的新书《算法通关之路》出版了。\n\n\u003Cimg src=\"https:\u002F\u002Fp.ipic.vip\u002Fzo8cz5.jpg\" height=\"300\">\n\n- [实体版购书链接 1](https:\u002F\u002Funion-click.jd.com\u002Fjdc?e=618%7Cpc%7C&p=JF8BAN4JK1olXwUFU1xcAUoRA18IGFMXXgQDUG4ZVxNJXF9RXh5UHw0cSgYYXBcIWDoXSQVJQwYBXFxeCkoTHDZNRwYlQ1J3BB0EWEl0QhkIH1xMBXBlDyQ1TkcbM244G1oUXQ4HU1tbDXsnA2g4STXN67Da8e9B3OGY1uefK1olXQEEUFhYCkgSAWwOHmsSXQ8yDwszD0sSUDtbGAlCDVJVAW5tOEgnBG8BD11nHFQWUixtOEsnAF9KdV5AWQcDB1cPDktEAWpfSwhFXwUDUllVDkMVATxbHVwWbQQDVVpUOHs)\n\n- [实体版购书链接 2](https:\u002F\u002Funion-click.jd.com\u002Fjdc?e=618|pc|&p=JF8BAM0JK1olXDYCV1ZfC0kWB19MRANLAjZbERscSkAJHTdNTwcKBlMdBgABFksUC20LGVoRQl9HCANtQDt-RAZPBQFwJ0ZEA1hDWh9wdTB2a1cZbQcyVF9cCEMSBGoOHmslXQEyAjBdCUoWAm4NG14WbQcyVFlYDk4eBG8LG1gUXzYFVFdtUx55BG8NSA9GXlRVBAoKXXsnM2w4HFscEEdQGW5tCHsUMy1mE14WDQcCUVxfWk9EBmkOSQsWDwVSVwpcWEoXUG5aElslXwcDUFdt)\n\n- [电子版购书链接](https:\u002F\u002Funion-click.jd.com\u002Fjdc?e=&p=JF8BAL0JK1olXDYAVVhfD04UAl9MRANLAjZbERscSkAJHTdNTwcKBlMdBgABFkkWBW0PHlgUQl9HCANtcS0SdTFvWVt1X3BkVV4Kc0JxYRtPe1cZbQcyVF9cCEMSBGoOHmslXQEyHzBcOEonA2gKE1oVWwEKXV5cAXsQA2Y4QA57WgYHBwoOCxlAUztfTmslbQUyZG5dOEgnQQFaSQ5FWQYFB1cODhgSVDpaS1hFDwQLUlwJAU5DAWcJHWsXXAcGXW4)\n\n## 图片加载不出来如何解决？\n\n\u003Chttps:\u002F\u002Fgithub.com\u002Ffe-lucifer\u002Ffanqiang>\n## 力扣专属折扣\n\n力扣免费题目已经有了很多经典的了，也覆盖了所有的题型，只是很多公司的真题都是锁定的。个人觉得如果你准备找工作的时候，可以买一个会员。另外会员很多leetbook 也可以看，结合学习计划，效率还是蛮高的。\n\n现在力扣在每日一题基础上还搞了一个 plus 会员挑战，每天刷题可以获得积分，积分可以兑换力扣周边。\n\n\u003Cimg src=\"https:\u002F\u002Fp.ipic.vip\u002Fha134p.png\" alt=\"plus 会员挑战\" height=\"200\">\n\n如果你要买力扣会员的话，这里有我的专属力扣折扣：**https:\u002F\u002Fleetcode.cn\u002Fpremium\u002F?promoChannel=lucifer** (年度会员**多送两个月**会员，季度会员**多送两周**会员)\n## :calendar:《91 天学算法》限时活动\n\n很多教育机构宣传的 7 天，一个月搞定算法面试的，我大概都了解了下，不怎么靠谱。学习算法这东西，还是要靠积累，没有量变是不可能有质变的。还有的人选择看书，这是一个不错的选择。但是很多人选了过时的或者质量差的书，又或者不会去写书中给的练习题，导致效果很差。\n\n基于这几个原因，我组织了一个 91 天刷题活动，通过一个相对比较长的时间（91 天）给出最新的学习路径，并强制大家打卡这种高强度练习来让大家**在 91 天后遇见更好的自己**。详细活动介绍可以点下方链接查看。另外往期的讲义也在下面了，大家可以看看合不合你的口味。\n\n最后送给大家一句话： **坚持下去，会有突然间成长的一天**。\n\n[点此参与](https:\u002F\u002Fgithub.com\u002Fazl397985856\u002Fleetcode\u002Fdiscussions\u002F532)\n\n- 🔥🔥🔥🔥 [活动首页](https:\u002F\u002Fleetcode-solution.cn\u002F91) 🔥🔥🔥🔥\n- [91 第三期讲义 - 二分专题（上）](.\u002Fthinkings\u002Fbinary-search-1.md)\n- [91 第三期讲义 - 二分专题（下）](.\u002Fthinkings\u002Fbinary-search-2.md)\n\n## 1V1 辅导\n\n如果大家觉得上面的集体活动效率比较低，我目前也接受 1v1 算法辅导，价格根据你的算法基础以及想要学习的内容而定感兴趣的可以加我微信，备注“算法辅导”，微信号 DevelopeEngineer。\n\n\n## :octocat: 仓库介绍\n\nleetcode 题解，记录自己的 leetcode 解题之路。\n\n本仓库目前分为**五个**部分：\n\n- 第一个部分是 leetcode 经典题目的解析，包括思路，关键点和具体的代码实现。\n\n- 第二部分是对于数据结构与算法的总结\n\n- 第三部分是 anki 卡片， 将 leetcode 题目按照一定的方式记录在 anki 中，方便大家记忆。\n\n- 第四部分是每日一题，每日一题是在交流群（包括微信和 qq）里进行的一种活动，大家一起 解一道题，这样讨论问题更加集中，会得到更多的反馈。而且 这些题目可以被记录下来，日后会进行筛选添加到仓库的题解模块。\n\n- 第五部分是计划， 这里会记录将来要加入到以上三个部分内容\n\n## :blue_book: 电子书\n\n**注意：这里的电子书并不是《算法通关之路》的电子版，而是本仓库内容的电子版！**\n\n[在线阅读地址](https:\u002F\u002Fleetcode-solution-leetcode-pp.gitbook.io\u002Fleetcode-solution\u002F)\n\n**限时免费下载！后期随时可能收费**\n\n可以去我的公众号《力扣加加》后台回复电子书获取！\n\n\u003Cimg src=\"https:\u002F\u002Fp.ipic.vip\u002Fh9nm77.jpg\" height=\"200\">\n\n> epub 还是有动图的\n\n另外有些内容只在公众号发布，因此大家觉得内容不错的话，可以关注一下。如果再给 ➕ 个星标就更棒啦！\n\n## :meat_on_bone: 仓库食用指南\n\n- 这里有一张互联网公司面试中经常考察的问题类型总结的思维导图，我们可以结合图片中的信息分析一下。\n\n![leetcode-zhihu](https:\u002F\u002Fp.ipic.vip\u002Fa20o3x.jpg)\n\n（图片来自 leetcode)\n\n其中算法，主要是以下几种：\n\n- 基础技巧：分治、二分、贪心\n- 排序算法：快速排序、归并排序、计数排序\n- 搜索算法：回溯、递归、深度优先遍历，广度优先遍历，二叉搜索树等\n- 图论：最短路径、最小生成树\n- 动态规划：背包问题、最长子序列\n\n数据结构，主要有如下几种：\n\n- 数组与链表：单 \u002F 双向链表\n- 栈与队列\n- 哈希表\n- 堆：最大堆 ／ 最小堆\n- 树与图：最近公共祖先、并查集\n- 字符串：前缀树（字典树） ／ 后缀树\n\n我在网上找到一份 [《Interview Cheat Sheet》](.\u002Fassets\u002Fcheatsheet.pdf)，这个 PDF 列举了面试的**模板步骤**。，详细指示了如何一步步完成面试。\n\n这个 pdf 开头就提到了好的代码三个标准：\n\n1. 可读性\n2. 时间复杂度\n3. 空间复杂度\n\n这写的太好了。\n\n紧接着，列举了 15 算法面试的步骤。比如步骤一：**当面试官提问完后，你需要先下来关键点（之后再下面写注释和代码）** 看完我的感受就是，**面试只要按照这个来做，成功率蹭蹭提升**\n\n## 数据结构与算法的总结\n\n- [数据结构总览](.\u002Fthinkings\u002Fbasic-data-structure.md)\n- [链表专题](.\u002Fthinkings\u002Flinked-list.md)\n- [树专题](.\u002Fthinkings\u002Ftree.md)\n- [堆专题（上）](.\u002Fthinkings\u002Fheap.md)\n- [堆专题（下）](.\u002Fthinkings\u002Fheap-2.md)\n- [二分专题（上）](.\u002Fthinkings\u002Fbinary-search-1.md)\n- [二分专题（下）](.\u002Fthinkings\u002Fbinary-search-2.md)\n\n\u003C!-- - [基础算法](.\u002Fthinkings\u002Fbasic-algorithm.md) -->\n\n- [动态规划（重置版）](.\u002Fthinkings\u002Fdynamic-programming.md)\n- [大话搜索](.\u002Fthinkings\u002Fsearch.md)\n- [二叉树的遍历](.\u002Fthinkings\u002Fbinary-tree-traversal.md)\n- [回溯](.\u002Fthinkings\u002Fbacktrack.md)\n- [哈夫曼编码和游程编码](.\u002Fthinkings\u002Frun-length-encode-and-huffman-encode.md)\n- [布隆过滤器](.\u002Fthinkings\u002Fbloom-filter.md)🖊\n- [前缀树](.\u002Fthinkings\u002Ftrie.md)🖊\n- [《日程安排》专题](https:\u002F\u002Flucifer.ren\u002Fblog\u002F2020\u002F02\u002F03\u002Fleetcode-%E6%88%91%E7%9A%84%E6%97%A5%E7%A8%8B%E5%AE%89%E6%8E%92%E8%A1%A8%E7%B3%BB%E5%88%97\u002F)\n- [《构造二叉树》专题](https:\u002F\u002Flucifer.ren\u002Fblog\u002F2020\u002F02\u002F08\u002F%E6%9E%84%E9%80%A0%E4%BA%8C%E5%8F%89%E6%A0%91%E4%B8%93%E9%A2%98\u002F)\n- [滑动窗口（思路 + 模板）](.\u002Fthinkings\u002Fslide-window.md)\n- [位运算](.\u002Fthinkings\u002Fbit.md)\n- [小岛问题](.\u002Fthinkings\u002Fisland.md)🖊\n- [最大公约数](.\u002Fthinkings\u002FGCD.md)\n- [并查集](.\u002Fthinkings\u002Funion-find.md)\n- [平衡二叉树专题](.\u002Fthinkings\u002Fbalanced-tree.md)\n- [蓄水池抽样](.\u002Fthinkings\u002Freservoid-sampling.md)\n- [单调栈](.\u002Fthinkings\u002Fmonotone-stack.md)\n\n## :exclamation: 怎么刷 LeetCode？\n\n- [我是如何刷 LeetCode 的](https:\u002F\u002Fwww.zhihu.com\u002Fquestion\u002F280279208\u002Fanswer\u002F824585814)\n- [算法小白如何高效、快速刷 leetcode？](https:\u002F\u002Fwww.zhihu.com\u002Fquestion\u002F321738058\u002Fanswer\u002F1279464192)\n- [刷题效率低？或许你就差这么一个插件](https:\u002F\u002Flucifer.ren\u002Fblog\u002F2020\u002F06\u002F06\u002Falgo-chrome-extension\u002F)\n- [力扣刷题插件](https:\u002F\u002Flucifer.ren\u002Fblog\u002F2020\u002F08\u002F16\u002Fleetcode-cheat\u002F)\n\n## :computer: 插件\n\n或许是一个可以改变你刷题效率的浏览器扩展插件。\n\n插件地址：\u003Chttps:\u002F\u002Fchrome.google.com\u002Fwebstore\u002Fdetail\u002Fleetcode-cheatsheet\u002Ffniccleejlofifaakbgppmbbcdfjonle?hl=en-US>。\n\n> 不能访问谷歌商店的朋友可以去我的公众号回复插件获取离线版。强烈推荐大家使用谷歌商店安装， 这样如果有更新可以自动安装，毕竟咱们的插件更新还是蛮快的。\n\n另外大家也可以使用 zerotrac 开发的用于计算力扣中题目分数的网站。这里的分数指的是竞赛分，大家可以根据自己的竞赛分选择稍微比自己竞赛分高一点的题目进行练习，注意这个只是根据通过人数等计算的一个预估分数。地址：https:\u002F\u002Fzerotrac.github.io\u002Fleetcode_problem_rating\u002F\n\n## 精选题解\n\n- [字典序列删除](.\u002Fselected\u002Fa-deleted.md)\n- [一次搞定前缀和](.\u002Fselected\u002FatMostK.md)\n- [字节跳动的算法面试题是什么难度？](.\u002Fselected\u002Fbyte-dance-algo-ex.md)\n- [字节跳动的算法面试题是什么难度？（第二弹）](.\u002Fselected\u002Fbyte-dance-algo-ex-2017.md)\n- [《我是你的妈妈呀》 - 第一期](.\u002Fselected\u002Fmother-01.md)\n- [一文带你看懂二叉树的序列化](.\u002Fselected\u002Fserialize.md)\n- [穿上衣服我就不认识你了？来聊聊最长上升子序列](.\u002Fselected\u002FLIS.md)\n- [你的衣服我扒了 - 《最长公共子序列》](.\u002Fselected\u002FLCS.md)\n- [一文看懂《最大子序列和问题》](.\u002Fselected\u002FLSS.md)\n\n## leetcode 经典题目的解析（200 多道）\n\n> 这里仅列举具有**代表性题目**，并不是全部题目\n\n目前更新了 200 多道题解，加上专题涉及的题目，差不多有 **300 道**。\n\n### 简单难度题目合集\n\n这里的题目难度比较小， 大多是模拟题，或者是很容易看出解法的题目，另外简单题目一般使用暴力法都是可以解决的。 这个时候只有看一下数据范围，思考下你的算法复杂度就行了。\n\n当然也不排除很多 hard 题目也可以暴力模拟，大家平时多注意数据范围即可。\n\n以下是我列举的经典题目（带 91 字样的表示出自 **91 天学算法**活动）：\n\n- [面试题 17.12. BiNode](.\u002Fproblems\u002Fbinode-lcci.md) 👍\n- [0001. 两数之和](.\u002Fproblems\u002F1.two-sum.md)\n- [0020. 有效的括号](.\u002Fproblems\u002F20.valid-parentheses.md)\n- [0021. 合并两个有序链表](.\u002Fproblems\u002F21.merge-two-sorted-lists.md)\n- [0026. 删除排序数组中的重复项](.\u002Fproblems\u002F26.remove-duplicates-from-sorted-array.md)\n- [0053. 最大子序和](.\u002Fproblems\u002F53.maximum-sum-subarray-cn.md)\n- [0066. 加一](.\u002Fproblems\u002F66.plus-one.md) 91\n- [0088. 合并两个有序数组](.\u002Fproblems\u002F88.merge-sorted-array.md)\n- [0101. 对称二叉树](.\u002Fproblems\u002F101.symmetric-tree.md)\n- [0104. 二叉树的最大深度](.\u002Fproblems\u002F104.maximum-depth-of-binary-tree.md)\n- [0108. 将有序数组转换为二叉搜索树](.\u002Fproblems\u002F108.convert-sorted-array-to-binary-search-tree.md)\n- [0121. 买卖股票的最佳时机](.\u002Fproblems\u002F121.best-time-to-buy-and-sell-stock.md)\n- [0122. 买卖股票的最佳时机 II](.\u002Fproblems\u002F122.best-time-to-buy-and-sell-stock-ii.md)\n- [0125. 验证回文串](.\u002Fproblems\u002F125.valid-palindrome.md)\n- [0136. 只出现一次的数字](.\u002Fproblems\u002F136.single-number.md)\n\n- [0155. 最小栈](.\u002Fproblems\u002F155.min-stack.md) 👍\n- [0160. 相交链表](.\u002Fproblems\u002F160.Intersection-of-Two-Linked-Lists.md) 91\n- [0167. 两数之和 II 输入有序数组](.\u002Fproblems\u002F167.two-sum-ii-input-array-is-sorted.md)\n- [0169. 多数元素](.\u002Fproblems\u002F169.majority-element.md)\n- [0172. 阶乘后的零](.\u002Fproblems\u002F172.factorial-trailing-zeroes.md)\n- [0190. 颠倒二进制位](.\u002Fproblems\u002F190.reverse-bits.md)\n- [0191. 位 1 的个数](.\u002Fproblems\u002F191.number-of-1-bits.md)\n- [0198. 打家劫舍](.\u002Fproblems\u002F198.house-robber.md)\n- [0203. 移除链表元素](.\u002Fproblems\u002F203.remove-linked-list-elements.md)\n- [0206. 反转链表](.\u002Fproblems\u002F206.reverse-linked-list.md)\n- [0219. 存在重复元素 II](.\u002Fproblems\u002F219.contains-duplicate-ii.md)\n- [0226. 翻转二叉树](.\u002Fproblems\u002F226.invert-binary-tree.md)\n- [0232. 用栈实现队列](.\u002Fproblems\u002F232.implement-queue-using-stacks.md) 👍 91\n- [0263. 丑数](.\u002Fproblems\u002F263.ugly-number.md)\n- [0283. 移动零](.\u002Fproblems\u002F283.move-zeroes.md)\n- [0342. 4 的幂](.\u002Fproblems\u002F342.power-of-four.md) 👍\n- [0349. 两个数组的交集](.\u002Fproblems\u002F349.intersection-of-two-arrays.md)\n- [0371. 两整数之和](.\u002Fproblems\u002F371.sum-of-two-integers.md)\n- [401. 二进制手表](.\u002Fproblems\u002F401.binary-watch.md)\n- [0437. 路径总和 III](.\u002Fproblems\u002F437.path-sum-iii.md)\n- [0455. 分发饼干](.\u002Fproblems\u002F455.AssignCookies.md)\n- [0504. 七进制数](.\u002Fproblems\u002F504.base-7.md)\n- [0575. 分糖果](.\u002Fproblems\u002F575.distribute-candies.md)\n- [0606. 根据二叉树创建字符串](.\u002Fproblems\u002F606.construct-string-from-binary-tree.md)\n- [0661. 图片平滑器](.\u002Fproblems\u002F661.image-smoother.md)\n- [0665. 非递减数列](.\u002Fproblems\u002F665.non-decreasing-array.md)\n- [821. 字符的最短距离](.\u002Fproblems\u002F821.shortest-distance-to-a-character.md) 91\n- [0874. 模拟行走机器人](.\u002Fproblems\u002F874.walking-robot-simulation.md)\n- [1128. 等价多米诺骨牌对的数量](.\u002Fproblems\u002F1128.number-of-equivalent-domino-pairs.md)\n- [1260. 二维网格迁移](.\u002Fproblems\u002F1260.shift-2d-grid.md)\n- [1332. 删除回文子序列](.\u002Fproblems\u002F1332.remove-palindromic-subsequences.md)\n- [2591. 将钱分给最多的儿童](.\u002Fproblems\u002F2591.distribute-money-to-maximum-children.md)\n\n\n### 中等难度题目合集\n\n中等题目是力扣比例最大的部分，因此这部分我的题解也是最多的。 大家不要太过追求难题，先把中等难度题目做熟了再说。\n\n这部分的题目要不需要我们挖掘题目的内含信息， 将其抽象成简单题目。 要么是一些写起来比较麻烦的题目， 一些人编码能力不行就挂了。因此大家一定要自己做， 即使看了题解 ”会了“，也要自己码一遍。自己不亲自写一遍，里面的细节永远不知道。\n\n以下是我列举的经典题目（带 91 字样的表示出自 **91 天学算法**活动）：\n\n- [面试题 17.09. 第 k 个数](.\u002Fproblems\u002Fget-kth-magic-number-lcci.md)\n- [面试题 17.23. 最大黑方阵](.\u002Fproblems\u002Fmax-black-square-lcci.md)\n- [面试题 16.16. 部分排序](.\u002Fproblems\u002Fsub-sort-lcci.md)\n- [Increasing Digits](.\u002Fproblems\u002FIncreasing-Digits.md) 👍\n- [Longest Contiguously Strictly Increasing Sublist After Deletion](.\u002Fproblems\u002FLongest-Contiguously-Strictly-Increasing-Sublist-After-Deletion.md) 👍\n- [Consecutive Wins](.\u002Fproblems\u002Fconsecutive-wins.md)\n- [Sort-String-by-Flipping](.\u002Fproblems\u002FSort-String-by-Flipping.md)\n- [Number of Substrings with Single Character Difference](.\u002Fproblems\u002FNumber-of-Substrings-with-Single-Character-Difference.md)\n- [Bus Fare](.\u002Fproblems\u002FBus-Fare.md) 👍\n- [Minimum Dropping Path Sum](.\u002Fproblems\u002FMinimum-Dropping-Path-Sum.md)\n- [Longest-Matrix-Path-Length](.\u002Fproblems\u002FLongest-Matrix-Path-Length.md)\n- [Every Sublist Min Sum](.\u002Fproblems\u002FEvery-Sublist-Min-Sum.md)\n- [Maximize the Number of Equivalent Pairs After Swaps](.\u002Fproblems\u002FMaximize-the-Number-of-Equivalent-Pairs-After-Swaps.md)\n\n- [0002. 两数相加](.\u002Fproblems\u002F2.add-two-numbers.md)\n- [0003. 无重复字符的最长子串](.\u002Fproblems\u002F3.longest-substring-without-repeating-characters.md)\n- [0005. 最长回文子串](.\u002Fproblems\u002F5.longest-palindromic-substring.md)\n- [0011. 盛最多水的容器](.\u002Fproblems\u002F11.container-with-most-water.md)\n- [0015. 三数之和](.\u002Fproblems\u002F15.3sum.md)\n- [0017. 电话号码的字母组合](.\u002Fproblems\u002F17.Letter-Combinations-of-a-Phone-Number.md)\n- [0019. 删除链表的倒数第 N 个节点](.\u002Fproblems\u002F19.removeNthNodeFromEndofList.md)\n- [0022. 括号生成](.\u002Fproblems\u002F22.generate-parentheses.md)\n- [0024. 两两交换链表中的节点](.\u002Fproblems\u002F24.swapNodesInPairs.md)\n- [0029. 两数相除](.\u002Fproblems\u002F29.divide-two-integers.md)\n- [0031. 下一个排列](.\u002Fproblems\u002F31.next-permutation.md)\n- [0033. 搜索旋转排序数组](.\u002Fproblems\u002F33.search-in-rotated-sorted-array.md)\n- [0039. 组合总和](.\u002Fproblems\u002F39.combination-sum.md)\n- [0040. 组合总和 II](.\u002Fproblems\u002F40.combination-sum-ii.md)\n- [0046. 全排列](.\u002Fproblems\u002F46.permutations.md)\n- [0047. 全排列 II](.\u002Fproblems\u002F47.permutations-ii.md)\n- [0048. 旋转图像](.\u002Fproblems\u002F48.rotate-image.md)\n- [0049. 字母异位词分组](.\u002Fproblems\u002F49.group-anagrams.md)\n- [0050. Pow(x, n)](.\u002Fproblems\u002F50.pow-x-n.md) 👍\n- [0055. 跳跃游戏](.\u002Fproblems\u002F55.jump-game.md)\n- [0056. 合并区间](.\u002Fproblems\u002F56.merge-intervals.md)\n- [0060. 第 k 个排列](.\u002Fproblems\u002F60.permutation-sequence.md) 👍\n- [0061. 旋转链表](.\u002Fproblems\u002F61.Rotate-List.md) 91\n- [0062. 不同路径](.\u002Fproblems\u002F62.unique-paths.md)\n- [0073. 矩阵置零](.\u002Fproblems\u002F73.set-matrix-zeroes.md)\n- [0075. 颜色分类](.\u002Fproblems\u002F75.sort-colors.md) 👍\n- [0078. 子集](.\u002Fproblems\u002F78.subsets.md)\n- [0079. 单词搜索](.\u002Fproblems\u002F79.word-search.md)\n- [0080. 删除排序数组中的重复项 II](.\u002Fproblems\u002F80.remove-duplicates-from-sorted-array-ii.md)\n- [0086. 分隔链表](.\u002Fproblems\u002F86.partition-list.md)\n- [0090. 子集 II](.\u002Fproblems\u002F90.subsets-ii.md)\n- [0091. 解码方法](.\u002Fproblems\u002F91.decode-ways.md)\n- [0092. 反转链表 II](.\u002Fproblems\u002F92.reverse-linked-list-ii.md)\n- [0094. 二叉树的中序遍历](.\u002Fproblems\u002F94.binary-tree-inorder-traversal.md) 👍\n- [0095. 不同的二叉搜索树 II](.\u002Fproblems\u002F95.unique-binary-search-trees-ii.md)\n- [0096. 不同的二叉搜索树](.\u002Fproblems\u002F96.unique-binary-search-trees.md)\n- [0098. 验证二叉搜索树](.\u002Fproblems\u002F98.validate-binary-search-tree.md)\n- [0102. 二叉树的层序遍历](.\u002Fproblems\u002F102.binary-tree-level-order-traversal.md)\n- [0103. 二叉树的锯齿形层次遍历](.\u002Fproblems\u002F103.binary-tree-zigzag-level-order-traversal.md)\n- [0113. 路径总和 II](.\u002Fproblems\u002F113.path-sum-ii.md)\n- [0129. 求根到叶子节点数字之和](.\u002Fproblems\u002F129.sum-root-to-leaf-numbers.md) 👍\n- [0130. 被围绕的区域](.\u002Fproblems\u002F130.surrounded-regions.md)\n- [0131. 分割回文串](.\u002Fproblems\u002F131.palindrome-partitioning.md)\n- [0139. 单词拆分](.\u002Fproblems\u002F139.word-break.md)\n- [0144. 二叉树的前序遍历](.\u002Fproblems\u002F144.binary-tree-preorder-traversal.md)\n- [0147. 对链表进行插入排序](.\u002Fproblems\u002F147.insertion-sort-list.md)\n- [0150. 逆波兰表达式求值](.\u002Fproblems\u002F150.evaluate-reverse-polish-notation.md)\n- [0152. 乘积最大子数组](.\u002Fproblems\u002F152.maximum-product-subarray.md)\n- [0153. 寻找旋转排序数组中的最小值](.\u002Fproblems\u002F153.find-minimum-in-rotated-sorted-array.md)\n- [0199. 二叉树的右视图](.\u002Fproblems\u002F199.binary-tree-right-side-view.md) 👍\n- [0200. 岛屿数量](.\u002Fproblems\u002F200.number-of-islands.md) 👍\n- [0201. 数字范围按位与](.\u002Fproblems\u002F201.bitwise-and-of-numbers-range.md)\n- [0208. 实现 Trie （前缀树）](.\u002Fproblems\u002F208.implement-trie-prefix-tree.md)\n- [0209. 长度最小的子数组](.\u002Fproblems\u002F209.minimum-size-subarray-sum.md)\n- [0211. 添加与搜索单词 - 数据结构设计](.\u002Fproblems\u002F211.add-and-search-word-data-structure-design.md)\n- [0215. 数组中的第 K 个最大元素](.\u002Fproblems\u002F215.kth-largest-element-in-an-array.md)\n- [0220. 存在重复元素 III](.\u002Fproblems\u002F220.contains-duplicate-iii.md)\n- [0221. 最大正方形](.\u002Fproblems\u002F221.maximal-square.md)\n- [0227. 基本计算器 II](.\u002Fproblems\u002F227.basic-calculator-ii.md)\n- [0229. 求众数 II](.\u002Fproblems\u002F229.majority-element-ii.md)\n- [0230. 二叉搜索树中第 K 小的元素](.\u002Fproblems\u002F230.kth-smallest-element-in-a-bst.md)\n- [0236. 二叉树的最近公共祖先](.\u002Fproblems\u002F236.lowest-common-ancestor-of-a-binary-tree.md)\n- [0238. 除自身以外数组的乘积](.\u002Fproblems\u002F238.product-of-array-except-self.md)\n- [0240. 搜索二维矩阵 II](.\u002Fproblems\u002F240.search-a-2-d-matrix-ii.md)\n- [0279. 完全平方数](.\u002Fproblems\u002F279.perfect-squares.md)\n- [0309. 最佳买卖股票时机含冷冻期](.\u002Fproblems\u002F309.best-time-to-buy-and-sell-stock-with-cooldown.md)\n- [0322. 零钱兑换](.\u002Fproblems\u002F322.coin-change.md) 👍\n- [0324. 摆动排序 II](.\u002Fproblems\u002F324.wiggle-sort-ii.md)\n- [0328. 奇偶链表](.\u002Fproblems\u002F328.odd-even-linked-list.md)\n- [0331. 验证二叉树的前序序列化](.\u002Fproblems\u002F331.verify-preorder-serialization-of-a-binary-tree.md)\n- [0334. 递增的三元子序列](.\u002Fproblems\u002F334.increasing-triplet-subsequence.md)\n- [0337. 打家劫舍 III](.\u002Fproblems\u002F337.house-robber-iii.md)\n- [0343. 整数拆分](.\u002Fproblems\u002F343.integer-break.md)\n- [0365. 水壶问题](.\u002Fproblems\u002F365.water-and-jug-problem.md)\n- [0378. 有序矩阵中第 K 小的元素](.\u002Fproblems\u002F378.kth-smallest-element-in-a-sorted-matrix.md)\n- [0380. 常数时间插入、删除和获取随机元素](.\u002Fproblems\u002F380.insert-delete-getrandom-o1.md)\n- [0385. 迷你语法分析器](.\u002Fproblems\u002F385.mini-parser.md)\n- [0394. 字符串解码](.\u002Fproblems\u002F394.decode-string.md) 91\n- [0416. 分割等和子集](.\u002Fproblems\u002F416.partition-equal-subset-sum.md)\n- [0424. 替换后的最长重复字符](.\u002Fproblems\u002F424.longest-repeating-character-replacement.md)\n- [0438. 找到字符串中所有字母异位词](.\u002Fproblems\u002F438.find-all-anagrams-in-a-string.md)\n- [0445. 两数相加 II](.\u002Fproblems\u002F445.add-two-numbers-ii.md)\n- [0454. 四数相加 II](.\u002Fproblems\u002F454.4-sum-ii.md)\n- [0456. 132 模式](.\u002Fproblems\u002F456.132-pattern.md)\n- [0457.457. 环形数组是否存在循环](.\u002Fproblems\u002F457.circular-array-loop.md)\n- [0464. 我能赢么](.\u002Fproblems\u002F464.can-i-win.md)\n- [0470. 用 Rand7() 实现 Rand10](.\u002Fproblems\u002F470.implement-rand10-using-rand7.md)\n- [0473. 火柴拼正方形](.\u002Fproblems\u002F473.matchsticks-to-square.md) 👍\n- [0494. 目标和](.\u002Fproblems\u002F494.target-sum.md)\n- [0516. 最长回文子序列](.\u002Fproblems\u002F516.longest-palindromic-subsequence.md)\n- [0513. 找树左下角的值](.\u002Fproblems\u002F513.find-bottom-left-tree-value.md) 91\n- [0518. 零钱兑换 II](.\u002Fproblems\u002F518.coin-change-2.md)\n- [0525. 连续数组](.\u002Fproblems\u002F525.contiguous-array.md)\n- [0547. 省份数量](.\u002Fproblems\u002F547.number-of-provinces.md)\n- [0560. 和为 K 的子数组](.\u002Fproblems\u002F560.subarray-sum-equals-k.md)\n- [0609. 在系统中查找重复文件](.\u002Fproblems\u002F609.find-duplicate-file-in-system.md)\n- [0611. 有效三角形的个数](.\u002Fproblems\u002F611.valid-triangle-number.md) 👍\n- [0673. 最长递增子序列的个数](.\u002Fproblems\u002F673.number-of-longest-increasing-subsequence.md)\n- [0686. 重复叠加字符串匹配](.\u002Fproblems\u002F686.repeated-string-match.md)\n- [0710. 黑名单中的随机数](.\u002Fproblems\u002F710.random-pick-with-blacklist.md)\n- [0714. 买卖股票的最佳时机含手续费](.\u002Fproblems\u002F714.best-time-to-buy-and-sell-stock-with-transaction-fee.md)\n- [0718. 最长重复子数组](.\u002Fproblems\u002F718.maximum-length-of-repeated-subarray.md)\n- [0735. 行星碰撞](.\u002Fproblems\u002F735.asteroid-collision.md) 👍\n- [0754. 到达终点数字](.\u002Fproblems\u002F754.reach-a-number.md)\n- [0785. 判断二分图](.\u002Fproblems\u002F785.is-graph-bipartite.md)\n- [0790. 多米诺和托米诺平铺](.\u002Fproblems\u002F790.domino-and-tromino-tiling.md)\n- [0799. 香槟塔](.\u002Fproblems\u002F799.champagne-tower.md)\n- [0801. 使序列递增的最小交换次数](.\u002Fproblems\u002F801.minimum-swaps-to-make-sequences-increasing.md)\n- [0816. 模糊坐标](.\u002Fproblems\u002F816.ambiguous-coordinates.md)\n- [0820. 单词的压缩编码](.\u002Fproblems\u002F820.short-encoding-of-words.md)\n- [0838. 推多米诺](.\u002Fproblems\u002F838.push-dominoes.md)\n- [0873. 最长的斐波那契子序列的长度](.\u002Fproblems\u002F873.length-of-longest-fibonacci-subsequence.md)\n- [0875. 爱吃香蕉的珂珂](.\u002Fproblems\u002F875.koko-eating-bananas.md)\n- [0877. 石子游戏](.\u002Fproblems\u002F877.stone-game.md)\n- [0886. 可能的二分法](.\u002Fproblems\u002F886.possible-bipartition.md)\n- [0898. 子数组按位或操作](.\u002Fproblems\u002F898.bitwise-ors-of-subarrays.md)\n- [0900. RLE 迭代器](.\u002Fproblems\u002F900.rle-iterator.md)\n- [0911. 在线选举](.\u002Fproblems\u002F911.online-election.md)\n- [0912. 排序数组](.\u002Fproblems\u002F912.sort-an-array.md)\n- [0918. 环形子数组的最大和](.\u002Fproblems\u002F918.maximum-sum-circular-subarray.md) 👍\n- [0932. 漂亮数组](.\u002Fproblems\u002F932.beautiful-array.md)\n- [0935. 骑士拨号器](.\u002Fproblems\u002F935.knight-dialer.md)\n- [0947. 移除最多的同行或同列石头](.\u002Fproblems\u002F947.most-stones-removed-with-same-row-or-column.md)\n- [0959. 由斜杠划分区域](.\u002Fproblems\u002F959.regions-cut-by-slashes.md)\n- [0978. 最长湍流子数组](.\u002Fproblems\u002F978.longest-turbulent-subarray.md)\n- [0987. 二叉树的垂序遍历](.\u002Fproblems\u002F987.vertical-order-traversal-of-a-binary-tree.md) 91\n- [1004. 最大连续 1 的个数 III](.\u002Fproblems\u002F1004.max-consecutive-ones-iii.md)\n- [1011. 在 D 天内送达包裹的能力](.\u002Fproblems\u002F1011.capacity-to-ship-packages-within-d-days.md)\n- [1014. 最佳观光组合](.\u002Fproblems\u002F1014.best-sightseeing-pair.md)\n- [1015. 可被 K 整除的最小整数](.\u002Fproblems\u002F1015.smallest-integer-divisible-by-k.md)\n- [1019. 链表中的下一个更大节点](.\u002Fproblems\u002F1019.next-greater-node-in-linked-list.md)\n- [1020. 飞地的数量](.\u002Fproblems\u002F1020.number-of-enclaves.md)\n- [1023. 驼峰式匹配](.\u002Fproblems\u002F1023.camelcase-matching.md)\n- [1031. 两个非重叠子数组的最大和](.\u002Fproblems\u002F1031.maximum-sum-of-two-non-overlapping-subarrays.md)\n- [1043. 分隔数组以得到最大和](.\u002Fproblems\u002F1043.partition-array-for-maximum-sum.md)\n- [1053. 交换一次的先前排列)](.\u002Fproblems\u002F1053.previous-permutation-with-one-swap.md)\n- [1104. 二叉树寻路](.\u002Fproblems\u002F1104.path-in-zigzag-labelled-binary-tree.md)\n- [1129. 颜色交替的最短路径](.\u002Fproblems\u002F1129.shortest-path-with-alternating-colors.md)\n- [1131. 绝对值表达式的最大值](.\u002Fproblems\u002F1131.maximum-of-absolute-value-expression.md)\n- [1138. 字母板上的路径](.\u002Fproblems\u002F1138.alphabet-board-path.md)\n- [1186. 删除一次得到子数组最大和](.\u002Fproblems\u002F1186.maximum-subarray-sum-with-one-deletion.md)\n- [1218. 最长定差子序列](.\u002Fproblems\u002F1218.longest-arithmetic-subsequence-of-given-difference.md)\n- [1227. 飞机座位分配概率](.\u002Fproblems\u002F1227.airplane-seat-assignment-probability.md) 👍\n- [1261. 在受污染的二叉树中查找元素](.\u002Fproblems\u002F1261.find-elements-in-a-contaminated-binary-tree.md)\n- [1262. 可被三整除的最大和](.\u002Fproblems\u002F1262.greatest-sum-divisible-by-three.md)\n- [1297. 子串的最大出现次数](.\u002Fproblems\u002F1297.maximum-number-of-occurrences-of-a-substring.md)\n- [1310. 子数组异或查询](.\u002Fproblems\u002F1310.xor-queries-of-a-subarray.md)\n- [1334. 阈值距离内邻居最少的城市](.\u002Fproblems\u002F1334.find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance.md)\n- [1371. 每个元音包含偶数次的最长子字符串](.\u002Fproblems\u002F1371.find-the-longest-substring-containing-vowels-in-even-counts.md)\n- [1381. 设计一个支持增量操作的栈](.\u002Fproblems\u002F1381.design-a-stack-with-increment-operation.md) 91\n- [1423. 可获得的最大点数](.\u002Fproblems\u002F1423.maximum-points-you-can-obtain-from-cards.md)\n- [1438. 绝对差不超过限制的最长连续子数组](.\u002Fproblems\u002F1438.longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit.md)\n- [1558. 得到目标数组的最少函数调用次数](.\u002Fproblems\u002F1558.minimum-numbers-of-function-calls-to-make-target-array.md)\n- [1574. 删除最短的子数组使剩余数组有序](.\u002Fproblems\u002F1574.shortest-subarray-to-be-removed-to-make-array-sorted.md)\n- [1589. 所有排列中的最大和](.\u002Fproblems\u002F1589.maximum-sum-obtained-of-any-permutation.md)\n- [1631. 最小体力消耗路径](.\u002Fproblems\u002F1631.path-with-minimum-effort.md)\n- [1638. 统计只差一个字符的子串数目](.\u002Fproblems\u002F1638.count-substrings-that-differ-by-one-character.md)\n- [1658. 将 x 减到 0 的最小操作数](.\u002Fproblems\u002F1658.minimum-operations-to-reduce-x-to-zero.md)\n- [1697. 检查边长度限制的路径是否存在](.\u002Fproblems\u002F1697.checking-existence-of-edge-length-limited-paths.md)\n- [1737. 满足三条件之一需改变的最少字符数](.\u002Fproblems\u002F1737.change-minimum-characters-to-satisfy-one-of-three-conditions.md) 👍\n- [1770. 执行乘法运算的最大分数](.\u002Fproblems\u002F1770.maximum-score-from-performing-multiplication-operations.md) 👍 91\n- [1793. 好子数组的最大分数](.\u002Fproblems\u002F1793.maximum-score-of-a-good-subarray.md) \n- [1834. 单线程 CPU](.\u002Fproblems\u002F1834.single-threaded-cpu.md)\n- [1899. 合并若干三元组以形成目标三元组](.\u002Fproblems\u002F1899.merge-triplets-to-form-target-triplet.md) 👍\n- [1904. 你完成的完整对局数](.\u002Fproblems\u002F1904.the-number-of-full-rounds-you-have-played.md)\n- [1906. 查询差绝对值的最小值](.\u002Fproblems\u002F1906.minimum-absolute-difference-queries.md)\n- [2007. 从双倍数组中还原原数组](.\u002Fproblems\u002F2007.find-original-array-from-doubled-array.md)\n- [2008. 出租车的最大盈利](.\u002Fproblems\u002F2008.maximum-earnings-from-taxi.md)\n- [2100. 适合打劫银行的日子](.\u002Fproblems\u002F5935.find-good-days-to-rob-the-bank.md)\n- [2101. 引爆最多的炸弹](.\u002Fproblems\u002F5936.detonate-the-maximum-bombs.md)\n- [2121. 相同元素的间隔之和](.\u002Fproblems\u002F5965.intervals-between-identical-elements.md)\n- [2207. 字符串中最多数目的子字符串](.\u002Fproblems\u002F6201.maximize-number-of-subsequences-in-a-string.md)\n- [2592. 最大化数组的伟大值](.\u002Fproblems\u002F2592.maximize-greatness-of-an-array.md)\n- [2593. 标记所有元素后数组的分数](.\u002Fproblems\u002F2593.find-score-of-an-array-after-marking-all-elements.md)\n- [2817. 限制条件下元素之间的最小绝对差](.\u002Fproblems\u002F2817.minimum-absolute-difference-between-elements-with-constraint.md)\n- [2865. 美丽塔 I](.\u002Fproblems\u002F2865.beautiful-towers-i.md)\n- [2866. 美丽塔 II](.\u002Fproblems\u002F2866.beautiful-towers-ii.md)\n- [2939. 最大异或乘积](.\u002Fproblems\u002F2939.maximum-xor-product.md)\n- [3377. 使两个整数相等的数位操作](.\u002Fproblems\u002F3377.digit-operations-to-make-two-integers-equal.md)\n- [3404. 统计特殊子序列的数目](.\u002Fproblems\u002F3404.count-special-subsequences.md)\n- [3428. 至多 K 个子序列的最大和最小和](.\u002Fproblems\u002F3428.maximum-and-minimum-sums-of-at-most-size-k-subsequences.md)\n- [3599. 划分数组以最小化异或值](.\u002Fproblems\u002F3599.partition-array-to-minimize-xor.md)\n\n### 困难难度题目合集\n\n困难难度题目从类型上说多是：\n\n- 图 \n- 设计题\n- 游戏场景题目\n- 中等题目的 follow up\n\n从解法上来说，多是：\n\n- 图算法\n- 动态规划\n- 二分法\n- DFS & BFS\n- 状态压缩\n- 剪枝\n\n从逻辑上说， 要么就是非常难想到，要么就是非常难写代码。 由于有时候需要组合多种算法，因此这部分题目的难度是最大的。\n\n这里我总结了几个技巧：\n\n1. 看题目的数据范围， 看能否暴力模拟\n2. 暴力枚举所有可能的算法往上套，比如图的题目。\n3. 对于代码非常难写的题目，可以总结和记忆解题模板，减少解题压力\n4. 对于组合多种算法的题目，先尝试简化问题，将问题划分成几个小问题，然后再组合起来。\n\n以下是我列举的经典题目（带 91 字样的表示出自 **91 天学算法**活动）：\n\n- [LCP 20. 快速公交](.\u002Fproblems\u002Flcp20.meChtZ.md)\n- [LCP 21. 追逐游戏](.\u002Fproblems\u002Flcp21.Za25hA.md) 👍\n- [Number Stream to Intervals](.\u002Fproblems\u002FNumber-Stream-to-Intervals.md)\n- [Triple Inversion](.\u002Fproblems\u002FTriple-Inversion.md) 91\n- [Kth Pair Distance](.\u002Fproblems\u002FKth-Pair-Distance.md) 91\n- [Minimum Light Radius](.\u002Fproblems\u002FMinimum-Light-Radius.md) 91\n- [Largest Equivalent Set of Pairs](.\u002Fproblems\u002FLargest-Equivalent-Set-of-Pairs.md) 👍\n- [Ticket-Order.md](.\u002Fproblems\u002FTicket-Order.md)\n- [Connected-Road-to-Destination](.\u002Fproblems\u002FConnected-Road-to-Destination.md)\n\n- [0004. 寻找两个正序数组的中位数](.\u002Fproblems\u002F4.median-of-two-sorted-arrays.md) 👍\n- [0023. 合并 K 个升序链表](.\u002Fproblems\u002F23.merge-k-sorted-lists.md)\n- [0025. K 个一组翻转链表](.\u002Fproblems\u002F25.reverse-nodes-in-k-groups.md) 👍\n- [0030. 串联所有单词的子串](.\u002Fproblems\u002F30.substring-with-concatenation-of-all-words.md)\n- [0032. 最长有效括号](.\u002Fproblems\u002F32.longest-valid-parentheses.md)\n- [0042. 接雨水](.\u002Fproblems\u002F42.trapping-rain-water.md)\n- [0052. N 皇后 II](.\u002Fproblems\u002F52.N-Queens-II.md)\n- [0057. 插入区间](problems\u002F57.insert-interval.md)\n- [0065. 有效数字](problems\u002F65.valid-number.md)\n- [0084. 柱状图中最大的矩形](.\u002Fproblems\u002F84.largest-rectangle-in-histogram.md)\n- [0085. 最大矩形](.\u002Fproblems\u002F85.maximal-rectangle.md)\n- [0087. 扰乱字符串](.\u002Fproblems\u002F87.scramble-string.md)\n- [0124. 二叉树中的最大路径和](.\u002Fproblems\u002F124.binary-tree-maximum-path-sum.md)\n- [0128. 最长连续序列](.\u002Fproblems\u002F128.longest-consecutive-sequence.md)\n- [0132. 分割回文串 II](.\u002Fproblems\u002F132.palindrome-partitioning-ii.md) 👍\n- [0140. 单词拆分 II](problems\u002F140.word-break-ii.md)\n- [0145. 二叉树的后序遍历](.\u002Fproblems\u002F145.binary-tree-postorder-traversal.md)\n- [0146. LRU 缓存机制](.\u002Fproblems\u002F146.lru-cache.md)\n- [0154. 寻找旋转排序数组中的最小值 II](.\u002Fproblems\u002F154.find-minimum-in-rotated-sorted-array-ii.md)\n- [0212. 单词搜索 II](.\u002Fproblems\u002F212.word-search-ii.md)\n- [0239. 滑动窗口最大值](.\u002Fproblems\u002F239.sliding-window-maximum.md) 👍\n- [0295. 数据流的中位数](.\u002Fproblems\u002F295.find-median-from-data-stream.md)\n- [0297. 二叉树的序列化与反序列化](.\u002Fproblems\u002F297.serialize-and-deserialize-binary-tree.md) 91\n- [0301. 删除无效的括号](.\u002Fproblems\u002F301.remove-invalid-parentheses.md)\n- [0312. 戳气球](.\u002Fproblems\u002F312.burst-balloons.md)\n- [330. 按要求补齐数组](.\u002Fproblems\u002F330.patching-array.md)\n\n- [0335. 路径交叉](.\u002Fproblems\u002F335.self-crossing.md)\n- [0460. LFU 缓存](.\u002Fproblems\u002F460.lfu-cache.md)\n- [0472. 连接词](.\u002Fproblems\u002F472.concatenated-words.md)\n- [0480. 滑动窗口中位数](.\u002Fproblems\u002F480.sliding-window-median.md)\n- [0483. 最小好进制](.\u002Fproblems\u002F483.smallest-good-base.md)\n- [0488. 祖玛游戏](.\u002Fproblems\u002F488.zuma-game.md)\n- [0493. 翻转对](.\u002Fproblems\u002F493.reverse-pairs.md)\n- [0664. 奇怪的打印机](.\u002Fproblems\u002F664.strange-printer.md)\n- [0679. 24 点游戏](.\u002Fproblems\u002F679.24-game.md)\n- [0715. Range 模块](.\u002Fproblems\u002F715.range-module.md) 👍\n- [0726. 原子的数量](.\u002Fproblems\u002F726.number-of-atoms.md)\n- [0768. 最多能完成排序的块 II](.\u002Fproblems\u002F768.max-chunks-to-make-sorted-ii.md) 91\n- [0805. 数组的均值分割](.\u002Fproblems\u002F805.split-array-with-same-average.md)\n- [0839. 相似字符串组](.\u002Fproblems\u002F839.similar-string-groups.md)\n- [0887. 鸡蛋掉落](.\u002Fproblems\u002F887.super-egg-drop.md)\n- [0895. 最大频率栈](.\u002Fproblems\u002F895.maximum-frequency-stack.md)\n- [0909. 蛇梯棋](.\u002Fproblems\u002F909.snakes-and-ladders.md)\n- [0975. 奇偶跳](.\u002Fproblems\u002F975.odd-even-jump.md)\n- [0995. K 连续位的最小翻转次数](.\u002Fproblems\u002F995.minimum-number-of-k-consecutive-bit-flips.md)\n- [1032. 字符流](.\u002Fproblems\u002F1032.stream-of-characters.md)\n- [1168. 水资源分配优化](.\u002Fproblems\u002F1168.optimize-water-distribution-in-a-village.md)\n- [1178. 猜字谜](.\u002Fproblems\u002F1178.number-of-valid-words-for-each-puzzle.md)\n- [1203. 项目管理](.\u002Fproblems\u002F1203.sort-items-by-groups-respecting-dependencies.md)\n- [1255. 得分最高的单词集合](.\u002Fproblems\u002F1255.maximum-score-words-formed-by-letters.md)\n- [1345. 跳跃游戏 IV](.\u002Fproblems\u002F1435.jump-game-iv.md)\n- [1449. 数位成本和为目标值的最大数字](.\u002Fproblems\u002F1449.form-largest-integer-with-digits-that-add-up-to-target.md)\n- [1494. 并行课程 II](.\u002Fproblems\u002F1494.parallel-courses-ii.md)\n- [1521. 找到最接近目标值的函数值](.\u002Fproblems\u002F1521.find-a-value-of-a-mysterious-function-closest-to-target.md)\n- [1526. 形成目标数组的子数组最少增加次数](.\u002Fproblems\u002F1526.minimum-number-of-increments-on-subarrays-to-form-a-target-array.md)\n- [1639. 通过给定词典构造目标字符串的方案数](.\u002Fproblems\u002F1639.number-of-ways-to-form-a-target-string-given-a-dictionary.md) new\n- [1649. 通过指令创建有序数组](.\u002Fproblems\u002F1649.create-sorted-array-through-instructions.md)\n- [1671. 得到山形数组的最少删除次数](.\u002Fproblems\u002F1671.minimum-number-of-removals-to-make-mountain-array.md)\n- [1707. 与数组中元素的最大异或值](.\u002Fproblems\u002F5640.maximum-xor-with-an-element-from-array.md)\n- [1713. 得到子序列的最少操作次数](.\u002Fproblems\u002F1713.minimum-operations-to-make-a-subsequence.md)\n- [1723. 完成所有工作的最短时间](.\u002Fproblems\u002F1723.find-minimum-time-to-finish-all-jobs.md)\n- [1787. 使所有区间的异或结果为零](.\u002Fproblems\u002F1787.make-the-xor-of-all-segments-equal-to-zero.md)\n- [1835. 所有数对按位与结果的异或和](.\u002Fproblems\u002F1835.find-xor-sum-of-all-pairs-bitwise-and.md)\n- [1871. 跳跃游戏 VII](.\u002Fproblems\u002F1871.jump-game-vii.md) 👍\n- [1872. 石子游戏 VIII](.\u002Fproblems\u002F1872.stone-game-viii.md)\n- [1883. 准时抵达会议现场的最小跳过休息次数](.\u002Fproblems\u002F5775.minimum-skips-to-arrive-at-meeting-on-time.md)\n- [1970. 你能穿过矩阵的最后一天](.\u002Fproblems\u002F1970.last-day-where-you-can-still-cross.md)\n- [2009. 使数组连续的最少操作数](.\u002Fproblems\u002F2009.minimum-number-of-operations-to-make-array-continuous.md)\n- [2025. 分割数组的最多方案数](.\u002Fproblems\u002F2025.maximum-number-of-ways-to-partition-an-array.md)\n- [2030. 含特定字母的最小子序列](.\u002Fproblems\u002F2030.smallest-k-length-subsequence-with-occurrences-of-a-letter.md)\n- [2102. 序列顺序查询](.\u002Fproblems\u002F2102.sequentially-ordinal-rank-tracker.md)\n- [2141. 同时运行 N 台电脑的最长时间](.\u002Fproblems\u002F2141.maximum-running-time-of-n-computers.md)\n- [2179. 统计数组中好三元组数目](.\u002Fproblems\u002F2179.count-good-triplets-in-an-array.md) 👍\n- [2209. 用地毯覆盖后的最少白色砖块](.\u002Fproblems\u002F2209.minimum-white-tiles-after-covering-with-carpets.md) 👍\n- [2281. 巫师的总力量和](.\u002Fproblems\u002F2281.sum-of-total-strength-of-wizards.md)\n- [2306. 公司命名](.\u002Fproblems\u002F2306.naming-a-company.md) 枚举优化好题\n- [2312. 卖木头块](.\u002Fproblems\u002F2312.selling-pieces-of-wood.md) 动态规划经典题\n- [2842. 统计一个字符串的 k 子序列美丽值最大的数目](.\u002Fproblems\u002F2842.count-k-subsequences-of-a-string-with-maximum-beauty.md)\n- [2972. 统计移除递增子数组的数目 II](.\u002Fproblems\u002F2972.count-the-number-of-incremovable-subarrays-ii.md)\n- [3027. 人员站位的方案数 II](.\u002Fproblems\u002F3027.find-the-number-of-ways-to-place-people-ii.md)\n- [3041. 修改数组后最大化数组中的连续元素数目 ](.\u002Fproblems\u002F3041.maximize-consecutive-elements-in-an-array-after-modification.md)\n- [3082. 求出所有子序列的能量和 ](.\u002Fproblems\u002F3082.find-the-sum-of-the-power-of-all-subsequences.md)\n- [3108. 带权图里旅途的最小代价](.\u002Fproblems\u002F3108.minimum-cost-walk-in-weighted-graph.md)\n- [3347. 执行操作后元素的最高频率 II](.\u002Fproblems\u002F3347.maximum-frequency-of-an-element-after-performing-operations-ii.md)\n- [3336. 最大公约数相等的子序列数量](.\u002Fproblems\u002F3336.find-the-number-of-subsequences-with-equal-gcd.md)\n- [3410. 删除所有值为某个元素后的最大子数组和](.\u002Fproblems\u002F3410.maximize-subarray-sum-after-removing-all-occurrences-of-one-element.md)\n\n\n## :trident: &nbsp;anki 卡片\n\nAnki 主要分为两个部分：一部分是关键点到题目的映射，另一部分是题目到思路，关键点，代码的映射。\n\n全部卡片都在 [anki-card](.\u002Fassets\u002Fanki\u002Fleetcode.apkg)\n\n使用方法：\n\nanki - 文件 - 导入 - 下拉格式选择“打包的 anki 集合”，然后选中你下载好的文件，确定即可。\n\n更多关于 anki 使用方法的请查看 [anki 官网](https:\u002F\u002Fapps.ankiweb.net\u002F)\n\n## 关于我\n\n大家也可以加我微信好友进行交流！\n\n![](https:\u002F\u002Fp.ipic.vip\u002Fwciz1n.jpg)\n\n## :chart_with_upwards_trend: 大事件\n\n- 2019-07-10 ：[纪念项目 Star 突破 1W 的一个短文](.\u002FthanksGiving.md)， 记录了项目的\"兴起\"之路，大家有兴趣可以看一下，如果对这个项目感兴趣，请**点击一下 Star**， 项目会**持续更新**，感谢大家的支持。\n\n- 2019-10-08: [纪念 LeetCode 项目 Star 突破 2W](.\u002FthanksGiving2.md)，并且 Github 搜索“LeetCode”，排名第一。\n\n- 2020-04-12: [项目突破三万 Star](.\u002FthanksGiving3.md)。\n- 2020-04-14: 官网`力扣加加`上线啦 💐💐💐💐💐，有专题讲解，每日一题，下载区和视频题解，后续会增加更多内容，还不赶紧收藏起来？地址：\u003Chttp:\u002F\u002Fleetcode-solution.cn\u002F>\n\n![](https:\u002F\u002Fp.ipic.vip\u002F98p19b.jpg)\n\n- 2021-02-23: star 破四万\n\n## :gift_heart: 贡献\n\n- 如果有想法和创意，请提 [issue](https:\u002F\u002Fgithub.com\u002Fazl397985856\u002Fleetcode\u002Fissues) 或者进群提\n- 如果想贡献增加题解或者翻译， 可以参考 [贡献指南](.\u002FCONTRIBUTING.md)\n  > 关于如何提交题解，我写了一份 [指南](.\u002Ftemplates\u002Fproblems\u002F1014.best-sightseeing-pair.md)\n- 如果需要修改项目中图片，[这里](.\u002Fassets\u002Fdrawio\u002F) 存放了项目中绘制图的源代码，大家可以用 [draw.io](https:\u002F\u002Fwww.draw.io\u002F) 打开进行编辑。\n\n## :love_letter: 鸣谢\n\n感谢为这个项目作出贡献的所有 [小伙伴](https:\u002F\u002Fgithub.com\u002Fazl397985856\u002Fleetcode\u002Fgraphs\u002Fcontributors)\n\n## License\n\n[CC BY-NC-ND 4.0](.\u002FLICENSE.txt)\n","该项目是一个记录作者解题历程的LeetCode题解集合，主要使用JavaScript编写。它不仅提供了详细的解题思路和代码实现，还涵盖了多种算法和数据结构的知识点，旨在帮助读者深入理解并掌握基础的数据结构与算法。项目特别适合准备技术面试、希望提升编程能力以及对算法感兴趣的开发者。此外，项目维护者还组织了91天刷题活动，并出版了相关书籍《算法通关之路》，为学习者提供更多资源和支持。","2026-06-11 02:37:52","top_all"]