{"id":13416640,"url":"https://github.com/doocs/leetcode","last_synced_at":"2025-05-13T10:55:49.551Z","repository":{"id":37334913,"uuid":"149001365","full_name":"doocs/leetcode","owner":"doocs","description":"🔥LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer（第 2 版）》、《程序员面试金典（第 6 版）》题解","archived":false,"fork":false,"pushed_at":"2025-05-05T14:26:41.000Z","size":640077,"stargazers_count":33842,"open_issues_count":0,"forks_count":9077,"subscribers_count":331,"default_branch":"main","last_synced_at":"2025-05-05T20:45:46.065Z","etag":null,"topics":["algorithms","cpp","csharp","golang","java","javascript","leetcode","python3"],"latest_commit_sha":null,"homepage":"https://leetcode.doocs.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc-by-sa-4.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doocs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":"doocs","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-09-16T14:03:03.000Z","updated_at":"2025-05-05T20:40:47.000Z","dependencies_parsed_at":"2024-04-12T09:02:59.960Z","dependency_job_id":"c77cd2b4-f3e8-45b2-89ec-8d08defcc898","html_url":"https://github.com/doocs/leetcode","commit_stats":{"total_commits":9881,"total_committers":194,"mean_commits":50.93298969072165,"dds":0.57716830280336,"last_synced_commit":"6bea4aae7aff9e443da296c90a12cb7aff843699"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fleetcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fleetcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fleetcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doocs%2Fleetcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doocs","download_url":"https://codeload.github.com/doocs/leetcode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252789146,"owners_count":21804400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","cpp","csharp","golang","java","javascript","leetcode","python3"],"created_at":"2024-07-30T22:00:17.895Z","updated_at":"2025-05-13T10:55:44.501Z","avatar_url":"https://github.com/doocs.png","language":"Java","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/doocs/leetcode\"\u003e\u003cimg src=\"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/leetcode%40main/images/doocs-leetcode.png\" alt=\"LeetCode-GitHub-Doocs\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://doocs.github.io/#/?id=how-to-join\"\u003e\u003cimg src=\"https://img.shields.io/badge/organization-join%20us-4051B5?style=flat-square\" alt=\"open-source-organization\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/doocs/leetcode\"\u003e\u003cimg src=\"https://img.shields.io/badge/langs-Python%20%7C%20Java%20%7C%20C++%20%7C%20Go%20%7C%20TypeScript%20%7C%20Rust%20%7C%20...-red?style=flat-square\u0026color=4051B5\" alt=\"languages\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/doocs/leetcode/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/doocs/leetcode?color=4051B5\u0026style=flat-square\" alt=\"LICENSE\"\u003e\u003c/a\u003e\u003cbr\u003e\n  \u003ca href=\"https://opencollective.com/doocs-leetcode/backers/badge.svg\" alt=\"backers on Open Collective\"\u003e\u003cimg src=\"https://img.shields.io/opencollective/backers/doocs-leetcode?color=4051B5\u0026style=flat-square\u0026logo=open%20collective\u0026logoColor=ffffff\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/doocs/leetcode/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/doocs/leetcode?color=4051B5\u0026logo=github\u0026style=flat-square\" alt=\"stars\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/doocs/leetcode/network/members\"\u003e\u003cimg src=\"https://img.shields.io/github/forks/doocs/leetcode?color=4051B5\u0026logo=github\u0026style=flat-square\" alt=\"forks\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opencollective.com/doocs-leetcode/sponsors/badge.svg\" alt=\"Sponsors on Open Collective\"\u003e\u003cimg src=\"https://img.shields.io/opencollective/sponsors/doocs-leetcode?color=4051B5\u0026style=flat-square\u0026logo=open%20collective\u0026logoColor=ffffff\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 介绍\n\n本项目包含 LeetCode、《剑指 Offer（第 2 版）》、《剑指 Offer（专项突击版）》、《程序员面试金典（第 6 版）》等题目的相关题解。所有题解均由多种编程语言实现，包括但不限于：Java、Python、C++、Go、TypeScript、Rust。我们正在全力更新，欢迎 Star 🌟 关注[本项目](https://github.com/doocs/leetcode)，获取项目最新动态。\n\n[English Version](/README_EN.md)\n\n## 站点\n\nhttps://leetcode.doocs.org\n\n## 算法全解\n\n-   [LeetCode](/solution/README.md)\n-   [往期竞赛合集](/solution/CONTEST_README.md)\n-   [剑指 Offer（第 2 版）](/lcof/README.md)\n-   [剑指 Offer（专项突击版）](/lcof2/README.md)\n-   [程序员面试金典（第 6 版）](/lcci/README.md)\n\n## 专项突破\n\n-   [JavaScript 专项练习](/solution/JAVASCRIPT_README.md)\n-   [数据库专项练习](/solution/DATABASE_README.md)\n\n## 算法提升专题\n\n### 1. 基础算法\n\n-   [在排序数组中查找元素的第一个和最后一个位置](/solution/0000-0099/0034.Find%20First%20and%20Last%20Position%20of%20Element%20in%20Sorted%20Array/README.md) - `二分查找`\n-   [准时到达的列车最小时速](/solution/1800-1899/1870.Minimum%20Speed%20to%20Arrive%20on%20Time/README.md) - `二分查找`\n-   [可移除字符的最大数目](/solution/1800-1899/1898.Maximum%20Number%20of%20Removable%20Characters/README.md) - `二分查找`\n-   [排序数组](/solution/0900-0999/0912.Sort%20an%20Array/README.md) - `快速排序`、`归并排序`\n-   [字符串相加](/solution/0400-0499/0415.Add%20Strings/README.md) - `高精度加法`\n-   [字符串相乘](/solution/0000-0099/0043.Multiply%20Strings/README.md) - `高精度乘法`\n-   [区域和检索 - 数组不可变](/solution/0300-0399/0303.Range%20Sum%20Query%20-%20Immutable/README.md) - `前缀和`\n-   [二维区域和检索 - 矩阵不可变](/solution/0300-0399/0304.Range%20Sum%20Query%202D%20-%20Immutable/README.md) - `二维前缀和`\n-   [区间加法](/solution/0300-0399/0370.Range%20Addition/README.md) - `前缀和`、`差分`\n-   [用邮票贴满网格图](/solution/2100-2199/2132.Stamping%20the%20Grid/README.md) - `二维前缀和`、`二维差分`\n-   [无重复字符的最长子串](/solution/0000-0099/0003.Longest%20Substring%20Without%20Repeating%20Characters/README.md) - `双指针`、`哈希表`\n-   [乘积小于 K 的子数组](/solution/0700-0799/0713.Subarray%20Product%20Less%20Than%20K/README.md) - `双指针`\n-   [位 1 的个数](/solution/0100-0199/0191.Number%20of%201%20Bits/README.md) - `位运算`、`lowbit`\n-   [合并区间](/solution/0000-0099/0056.Merge%20Intervals/README.md) - `区间合并`\n\u003c!-- 排序算法、待补充 --\u003e\n\n### 2. 数据结构\n\n-   [设计链表](/solution/0700-0799/0707.Design%20Linked%20List/README.md) - `单链表`、`指针引用`、`数组实现`\n-   [下一个更大元素 I](/solution/0400-0499/0496.Next%20Greater%20Element%20I/README.md) - `单调栈`\n-   [每日温度](/solution/0700-0799/0739.Daily%20Temperatures/README.md) - `单调栈`\n-   [子数组的最小值之和](/solution/0900-0999/0907.Sum%20of%20Subarray%20Minimums/README.md) - `单调栈`\n-   [最大宽度坡](/solution/0900-0999/0962.Maximum%20Width%20Ramp/README.md) - `单调栈`\n-   [最多能完成排序的块 II](/solution/0700-0799/0768.Max%20Chunks%20To%20Make%20Sorted%20II/README.md) - `单调栈`\n-   [子数组范围和](/solution/2100-2199/2104.Sum%20of%20Subarray%20Ranges/README.md) - `单调栈`\n-   [子数组最小乘积的最大值](/solution/1800-1899/1856.Maximum%20Subarray%20Min-Product/README.md) - `单调栈`\n-   [滑动窗口最大值](/solution/0200-0299/0239.Sliding%20Window%20Maximum/README.md) - `单调队列`\n-   [满足不等式的最大值](/solution/1400-1499/1499.Max%20Value%20of%20Equation/README.md) - `单调队列`\n-   [和至少为 K 的最短子数组](/solution/0800-0899/0862.Shortest%20Subarray%20with%20Sum%20at%20Least%20K/README.md) - `单调队列`\n-   [带限制的子序列和](/solution/1400-1499/1425.Constrained%20Subsequence%20Sum/README.md) - `动态规划`、`单调队列优化`\n-   [单词规律 II](/solution/0200-0299/0291.Word%20Pattern%20II/README.md) - `哈希表`、`回溯`\n-   [最短回文串](/solution/0200-0299/0214.Shortest%20Palindrome/README.md) - `字符串哈希`\n-   [回文对](/solution/0300-0399/0336.Palindrome%20Pairs/README.md) - `字符串哈希`\n-   [最长重复子串](/solution/1000-1099/1044.Longest%20Duplicate%20Substring/README.md) - `字符串哈希`、`二分查找`\n-   [不同的循环子字符串](/solution/1300-1399/1316.Distinct%20Echo%20Substrings/README.md) - `字符串哈希`\n\n### 3. 搜索\n\n-   [图像渲染](/solution/0700-0799/0733.Flood%20Fill/README.md)- `BFS`、`DFS`、`Flood Fill 算法`、`连通性模型`\n-   [岛屿数量](/solution/0200-0299/0200.Number%20of%20Islands/README.md) - `BFS`、`Flood Fill 算法`\n-   [01 矩阵](/solution/0500-0599/0542.01%20Matrix/README.md) - `多源 BFS`\n-   [地图中的最高点](/solution/1700-1799/1765.Map%20of%20Highest%20Peak/README.md) - `多源 BFS`\n-   [进击的骑士](/solution/1100-1199/1197.Minimum%20Knight%20Moves/README.md) - `BFS`、`最短路模型`\n-   [二进制矩阵中的最短路径](/solution/1000-1099/1091.Shortest%20Path%20in%20Binary%20Matrix/README.md) - `BFS`、`最短路模型`\n-   [迷宫中离入口最近的出口](/solution/1900-1999/1926.Nearest%20Exit%20from%20Entrance%20in%20Maze/README.md) - `BFS`、`最短路模型`\n-   [网格中的最短路径](/solution/1200-1299/1293.Shortest%20Path%20in%20a%20Grid%20with%20Obstacles%20Elimination/README.md) - `BFS`、`最短路模型`\n-   [打开转盘锁](/solution/0700-0799/0752.Open%20the%20Lock/README.md) - `最小步数模型`、`双向 BFS`、`A* 算法`\n-   [单词接龙](/solution/0100-0199/0127.Word%20Ladder/README.md) - `最小步数模型`、`双向 BFS`\n-   [转化数字的最小运算数](/solution/2000-2099/2059.Minimum%20Operations%20to%20Convert%20Number/README.md) - `最小步数模型`、`双向 BFS`\n-   [滑动谜题](/solution/0700-0799/0773.Sliding%20Puzzle/README.md) - `BFS`、`最小步数模型`、`A* 算法`\n-   [访问所有节点的最短路径](/solution/0800-0899/0847.Shortest%20Path%20Visiting%20All%20Nodes/README.md) - `BFS`、`最小步数模型`、`A* 算法`\n-   [为高尔夫比赛砍树](/solution/0600-0699/0675.Cut%20Off%20Trees%20for%20Golf%20Event/README.md) - `BFS`、`A* 算法`\n-   [使网格图至少有一条有效路径的最小代价](/solution/1300-1399/1368.Minimum%20Cost%20to%20Make%20at%20Least%20One%20Valid%20Path%20in%20a%20Grid/README.md) - `双端队列 BFS`\n-   [到达角落需要移除障碍物的最小数目](/solution/2200-2299/2290.Minimum%20Obstacle%20Removal%20to%20Reach%20Corner/README.md) - `双端队列 BFS`\n-   [迷宫](/solution/0400-0499/0490.The%20Maze/README.md) - `DFS`、`连通性模型`、`Flood Fill 算法`\n-   [单词搜索](/solution/0000-0099/0079.Word%20Search/README.md) - `DFS`、`搜索顺序`、`回溯`\n-   [黄金矿工](/solution/1200-1299/1219.Path%20with%20Maximum%20Gold/README.md) - `DFS`、`搜索顺序`、`回溯`\n-   [火柴拼正方形](/solution/0400-0499/0473.Matchsticks%20to%20Square/README.md) - `DFS`、`回溯`、`剪枝`\n-   [划分为 k 个相等的子集](/solution/0600-0699/0698.Partition%20to%20K%20Equal%20Sum%20Subsets/README.md) - `DFS`、`回溯`、`剪枝`\n-   [完成所有工作的最短时间](/solution/1700-1799/1723.Find%20Minimum%20Time%20to%20Finish%20All%20Jobs/README.md) - `DFS`、`回溯`、`剪枝`\n-   [公平分发饼干](/solution/2300-2399/2305.Fair%20Distribution%20of%20Cookies/README.md) - `DFS`、`回溯`、`剪枝`\n-   [矩阵中的最长递增路径](/solution/0300-0399/0329.Longest%20Increasing%20Path%20in%20a%20Matrix/README.md) - `DFS`、`记忆化搜索`\n-   [网格图中递增路径的数目](/solution/2300-2399/2328.Number%20of%20Increasing%20Paths%20in%20a%20Grid/README.md) - `DFS`、`记忆化搜索`\n-   [翻转游戏 II](/solution/0200-0299/0294.Flip%20Game%20II/README.md) - `DFS`、`状态压缩`、`记忆化搜索`\n-   [统计所有可行路径](/solution/1500-1599/1575.Count%20All%20Possible%20Routes/README.md) - `DFS`、`记忆化搜索`\n-   [切披萨的方案数](/solution/1400-1499/1444.Number%20of%20Ways%20of%20Cutting%20a%20Pizza/README.md) - `DFS`、`记忆化搜索`\n\n\u003c!-- DFS 待补充 --\u003e\n\n### 4. 动态规划（DP）\n\n-   [杨辉三角](/solution/0100-0199/0118.Pascal's%20Triangle/README.md) - `线性 DP`、`数字三角形模型`\n-   [最小路径和](/solution/0000-0099/0064.Minimum%20Path%20Sum/README.md) - `线性 DP`、`数字三角形模型`\n-   [摘樱桃](/solution/0700-0799/0741.Cherry%20Pickup/README.md) - `线性 DP`、`数字三角形模型`\n-   [摘樱桃 II](/solution/1400-1499/1463.Cherry%20Pickup%20II/README.md) - `线性 DP`、`数字三角形模型`\n-   [最长递增子序列](/solution/0300-0399/0300.Longest%20Increasing%20Subsequence/README.md) - `线性 DP`、`最长上升子序列模型`\n-   [无重叠区间](/solution/0400-0499/0435.Non-overlapping%20Intervals/README.md) - `线性 DP`、`最长上升子序列模型`、`贪心优化`\n-   [删列造序 III](/solution/0900-0999/0960.Delete%20Columns%20to%20Make%20Sorted%20III/README.md) - `线性 DP`、`最长上升子序列模型`\n-   [俄罗斯套娃信封问题](/solution/0300-0399/0354.Russian%20Doll%20Envelopes/README.md) - `线性 DP`、`最长上升子序列模型`、`贪心优化`\n-   [堆叠长方体的最大高度](/solution/1600-1699/1691.Maximum%20Height%20by%20Stacking%20Cuboids/README.md) - `排序`、`线性 DP`、`最长上升子序列模型`\n-   [无矛盾的最佳球队](/solution/1600-1699/1626.Best%20Team%20With%20No%20Conflicts/README.md) - `排序`、`线性 DP`、`最长上升子序列模型`\n-   [最长公共子序列](/solution/1100-1199/1143.Longest%20Common%20Subsequence/README.md) - `线性 DP`、`最长公共子序列模型`\n-   [两个字符串的最小 ASCII 删除和](/solution/0700-0799/0712.Minimum%20ASCII%20Delete%20Sum%20for%20Two%20Strings/README.md) - `线性 DP`、`最长公共子序列模型`\n-   [两个字符串的删除操作](/solution/0500-0599/0583.Delete%20Operation%20for%20Two%20Strings/README.md) - `线性 DP`、`最长公共子序列模型`\n-   [目标和](/solution/0400-0499/0494.Target%20Sum/README.md) - `0-1 背包问题`\n-   [分割等和子集](/solution/0400-0499/0416.Partition%20Equal%20Subset%20Sum/README.md) - `0-1 背包问题`\n-   [最后一块石头的重量 II](/solution/1000-1099/1049.Last%20Stone%20Weight%20II/README.md) - `0-1 背包问题`\n-   [零钱兑换](/solution/0300-0399/0322.Coin%20Change/README.md) - `完全背包问题`\n-   [组合总和 Ⅳ](/solution/0300-0399/0377.Combination%20Sum%20IV/README.md) - `完全背包问题`\n-   [从栈中取出 K 个硬币的最大面值和](/solution/2200-2299/2218.Maximum%20Value%20of%20K%20Coins%20From%20Piles/README.md) - `分组背包问题`\n-   [数字 1 的个数](/solution/0200-0299/0233.Number%20of%20Digit%20One/README.md) - `数位 DP`、`记忆化搜索`\n-   [统计各位数字都不同的数字个数](/solution/0300-0399/0357.Count%20Numbers%20with%20Unique%20Digits/README.md) - `数位 DP`、`记忆化搜索`、`状态压缩`\n-   [不含连续 1 的非负整数](/solution/0600-0699/0600.Non-negative%20Integers%20without%20Consecutive%20Ones/README.md) - `数位 DP`、`记忆化搜索`\n-   [旋转数字](/solution/0700-0799/0788.Rotated%20Digits/README.md) - `数位 DP`、`记忆化搜索`\n-   [最大为 N 的数字组合](/solution/0900-0999/0902.Numbers%20At%20Most%20N%20Given%20Digit%20Set/README.md) - `数位 DP`、`记忆化搜索`\n-   [统计特殊整数](/solution/2300-2399/2376.Count%20Special%20Integers/README.md) - `数位 DP`、`记忆化搜索`\n\n\u003c!-- 背包问题、状态机模型、状压DP、区间DP、树形DP、数位DP 待补充 --\u003e\n\n### 5. 高级数据结构\n\n-   [二维网格图中探测环](/solution/1500-1599/1559.Detect%20Cycles%20in%202D%20Grid/README.md) - `并查集`、`检测环`\n-   [除法求值](/solution/0300-0399/0399.Evaluate%20Division/README.md) - `并查集`、`权值维护`\n-   [由斜杠划分区域](/solution/0900-0999/0959.Regions%20Cut%20By%20Slashes/README.md) - `并查集`、`连通分量个数`\n-   [水位上升的泳池中游泳](/solution/0700-0799/0778.Swim%20in%20Rising%20Water/README.md) - `并查集`\n-   [交换字符串中的元素](/solution/1200-1299/1202.Smallest%20String%20With%20Swaps/README.md) - `并查集`\n-   [打砖块](/solution/0800-0899/0803.Bricks%20Falling%20When%20Hit/README.md) - `并查集`、`逆向思维`\n-   [尽量减少恶意软件的传播 II](/solution/0900-0999/0928.Minimize%20Malware%20Spread%20II/README.md) - `并查集`、`逆向思维`\n-   [检查边长度限制的路径是否存在](/solution/1600-1699/1697.Checking%20Existence%20of%20Edge%20Length%20Limited%20Paths/README.md) - `并查集`、`离线思维`\n-   [保证图可完全遍历](/solution/1500-1599/1579.Remove%20Max%20Number%20of%20Edges%20to%20Keep%20Graph%20Fully%20Traversable/README.md) - `双并查集`\n-   [区域和检索 - 数组可修改](/solution/0300-0399/0307.Range%20Sum%20Query%20-%20Mutable/README.md) - `树状数组`、`线段树`\n-   [通过指令创建有序数组](/solution/1600-1699/1649.Create%20Sorted%20Array%20through%20Instructions/README.md) - `树状数组`、`线段树`\n-   [统计数组中好三元组数目](/solution/2100-2199/2179.Count%20Good%20Triplets%20in%20an%20Array/README.md) - `树状数组`、`线段树`\n-   [最多 K 次交换相邻数位后得到的最小整数](/solution/1500-1599/1505.Minimum%20Possible%20Integer%20After%20at%20Most%20K%20Adjacent%20Swaps%20On%20Digits/README.md) - `树状数组`\n-   [二维区域和检索 - 可变](/solution/0300-0399/0308.Range%20Sum%20Query%202D%20-%20Mutable/README.md) - `二维树状数组`、`线段树`\n-   [计算右侧小于当前元素的个数](/solution/0300-0399/0315.Count%20of%20Smaller%20Numbers%20After%20Self/README.md) - `离散化树状数组`、`线段树`\n-   [区间和的个数](/solution/0300-0399/0327.Count%20of%20Range%20Sum/README.md) - `离散化树状数组`、`线段树`\n-   [翻转对](/solution/0400-0499/0493.Reverse%20Pairs/README.md) - `离散化树状数组`、`分治归并`、`线段树`\n-   [最长递增子序列的个数](/solution/0600-0699/0673.Number%20of%20Longest%20Increasing%20Subsequence/README.md) - `离散化树状数组`、`区间最值问题`\n-   [奇妙序列](/solution/1600-1699/1622.Fancy%20Sequence/README.md) - `动态开点线段树`、`懒标记`\n-   [Range 模块](/solution/0700-0799/0715.Range%20Module/README.md) - `动态开点线段树`、`懒标记`\n-   [我的日程安排表 III](/solution/0700-0799/0732.My%20Calendar%20III/README.md) - `动态开点线段树`、`懒标记`\n-   [每天绘制的新区域数量](/solution/2100-2199/2158.Amount%20of%20New%20Area%20Painted%20Each%20Day/README.md) - `动态开点线段树`、`懒标记`、`区间染色模型`\n-   [由单个字符重复的最长子字符串](/solution/2200-2299/2213.Longest%20Substring%20of%20One%20Repeating%20Character/README.md) - `线段树`、`动态最大子段和模型`\n-   [矩形面积 II](/solution/0800-0899/0850.Rectangle%20Area%20II/README.md) - `线段树`、`离散化`、`扫描线`\n\n### 6. 图论\n\n-   [网络延迟时间](/solution/0700-0799/0743.Network%20Delay%20Time/README.md) - `最短路`、`Dijkstra 算法`、`Bellman Ford 算法`、`SPFA 算法`\n-   [得到要求路径的最小带权子图](/solution/2200-2299/2203.Minimum%20Weighted%20Subgraph%20With%20the%20Required%20Paths/README.md) - `最短路`、`Dijkstra 算法`\n-   [连接所有点的最小费用](/solution/1500-1599/1584.Min%20Cost%20to%20Connect%20All%20Points/README.md) - `最小生成树`、`Prim 算法`、`Kruskal 算法`\n-   [最低成本联通所有城市](/solution/1100-1199/1135.Connecting%20Cities%20With%20Minimum%20Cost/README.md) - `最小生成树`、`Kruskal 算法`、`并查集`\n-   [水资源分配优化](/solution/1100-1199/1168.Optimize%20Water%20Distribution%20in%20a%20Village/README.md) - `最小生成树`、`Kruskal 算法`、`并查集`\n-   [找到最小生成树里的关键边和伪关键边](/solution/1400-1499/1489.Find%20Critical%20and%20Pseudo-Critical%20Edges%20in%20Minimum%20Spanning%20Tree/README.md) - `最小生成树`、`Kruskal 算法`、`并查集`\n-   [判断二分图](/solution/0700-0799/0785.Is%20Graph%20Bipartite/README.md) - `染色法判定二分图`、`并查集`\n\n\u003c!-- 待补充\n### 7. 数学知识\n --\u003e\n\n## 加入我们\n\n刷编程题的最大好处就是可以锻炼解决问题的思维能力。相信我，「如何去思考」​ 本身也是一项需要不断学习和练习的技能。非常感谢前微软工程师、现蚂蚁金服技术专家 [@kfstorm](https://github.com/kfstorm) 贡献了本项目的所有 [C# 题解](https://github.com/doocs/leetcode/pull/245)。\n\n如果你对本项目感兴趣，并且希望加入我们刷题小分队，欢迎随时提交 [PR](https://github.com/doocs/leetcode/pulls)。请参考如下步骤：\n\n1. 将本项目 fork 到你的个人 GitHub 帐户，然后 clone 到你的本地机器；\n1. 进入 leetcode 目录，切换到一个新的分支；\n1. 对项目做出一些变更，然后使用 git add、commit、push 等命令将你的本地变更提交到你的远程 GitHub 仓库；\n1. 将你的变更以 PR 的形式提交过来，项目的维护人员会在第一时间对你的变更进行 review！\n1. 你也可以参考帮助文档 https://help.github.com/cn 了解更多细节。\n\n\u003cdiv align=\"center\"\u003e\n\n```mermaid\ngraph TD;\n    A[LeetCode 仓库 \u003cbr\u003e doocs/leetcode.git] -- 1.Fork（派生） --\u003e B[你的 GitHub 仓库 \u003cbr\u003e yourusername/leetcode.git];\n    B -- 2.Git 克隆 --\u003e C[本地开发环境];\n    C -- 3.创建新分支并修改代码 --\u003e D[本地修改后的代码];\n    D -- 4.提交 \u0026 推送到你的仓库 --\u003e B;\n    B -- 5.提交 Pull Request（合并请求） --\u003e A;\n```\n\n\u003c/div\u003e\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true\u0026ref=main\u0026repo=149001365\u0026machine=basicLinux32gb\u0026location=SoutheastAsia)\n\n## Stars 趋势\n\n\u003ca href=\"https://github.com/doocs/leetcode/stargazers\" target=\"_blank\"\u003e\u003cimg src=\"./images/starcharts.svg\" alt=\"Stargazers over time\" /\u003e\u003c/a\u003e\n\n\u003ca href=\"https://next.ossinsight.io/widgets/official/analyze-repo-stars-map?repo_id=149001365\u0026activity=stars\" target=\"_blank\" style=\"display: block\" align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?repo_id=149001365\u0026activity=stars\u0026image_size=auto\u0026color_scheme=dark\" width=\"721\" height=\"auto\"\u003e\n    \u003cimg alt=\"Star Geographical Distribution of doocs/leetcode\" src=\"https://next.ossinsight.io/widgets/official/analyze-repo-stars-map/thumbnail.png?repo_id=149001365\u0026activity=stars\u0026image_size=auto\u0026color_scheme=light\" width=\"721\" height=\"auto\"\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n## 贡献者\n\n感谢以下所有朋友对本项目的贡献！\n\n\u003ca href=\"https://github.com/doocs/leetcode/graphs/contributors\" target=\"_blank\"\u003e\u003cimg src=\"https://contrib.rocks/image?repo=doocs/leetcode\u0026max=500\" /\u003e\u003c/a\u003e\n\n## 赞助者\n\n感谢以下个人、组织对本项目的支持和赞助！\n\n\u003ca href=\"https://opencollective.com/doocs-leetcode/backers.svg?width=890\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/doocs-leetcode/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n\u003ca href=\"https://opencollective.com/doocs-leetcode/sponsors.svg?width=890\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/doocs-leetcode/sponsors.svg?width=890\"\u003e\u003c/a\u003e\n\n\u003e \"_You help the developer community practice for interviews, and there is nothing better we could ask for._\" -- [Alan Yessenbayev](https://opencollective.com/alan-yessenbayev)\n\n## 版权\n\n本项目著作权归 [GitHub 开源社区 Doocs](https://github.com/doocs) 所有，商业转载请联系 @yanglbme 获得授权，非商业转载请注明出处。\n\n## 联系我们\n\n欢迎各位小伙伴们添加 @yanglbme 的个人微信（微信号：YLB0109），备注 「**leetcode**」。后续我们会创建算法、技术相关的交流群，大家一起交流学习，分享经验，共同进步。\n\n| \u003cimg src=\"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/images/qrcode-for-yanglbme.png\" width=\"260px\" align=\"left\"/\u003e |\n| ------------------------------------------------------------------------------------------------------------------------------ |\n\n## 许可证\n\n\u003ca rel=\"license\" href=\"http://creativecommons.org/licenses/by-sa/4.0/\"\u003e知识共享 版权归属-相同方式共享 4.0 国际 公共许可证\u003c/a\u003e\n","funding_links":["https://opencollective.com/doocs","https://opencollective.com/alan-yessenbayev"],"categories":["Popular","Java","HarmonyOS","计算机编程 数据结构与算法","数据结构与算法"],"sub_categories":["Windows Manager","网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoocs%2Fleetcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoocs%2Fleetcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoocs%2Fleetcode/lists"}