Leetcode
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
Install / Use
/learn @grandyang/LeetcodeREADME
LeetCode All In One
English | 简体中文
Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.
Same as this: LeetCode All in One 题目讲解汇总(持续更新中...)
Click below image to watch YouTube Video

Note: All explanations are written in Github Issues, please do not create any new issue or pull request in this project since the problem index should be consistent with the issue index, thanks!
('$' means the problem is locked on Leetcode, '*' means the problem is related to Database, '#' means the problem is related to Shell, '~' means the concurrency problems.)
| # | Title | Solution | Difficulty | |---| ----- | -------- | ---------- | |1352|Product of the Last K Numbers|50.20%|Medium| |1351|Count Negative Numbers in a Sorted Matrix|77.30%|Easy| |1350|Students With Invalid Departments * $|89.90%|Easy| |1349|Maximum Students Taking Exam|49.80%|Hard| |1348|Tweet Counts Per Frequency|44.00%|Medium| |1347|Minimum Number of Steps to Make Two Strings Anagram|78.00%|Medium| |1346|Check If N and Its Double Exist|36.70%|Easy| |1345|Jump Game IV|46.60%|Hard| |1344|Angle Between Hands of a Clock|63.40%|Medium| |1343|Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold|68.10%|Medium| |1342|Number of Steps to Reduce a Number to Zero|84.90%|Easy| |1341|Movie Rating *|43.80%|Medium| |1340|Jump Game V|62.60%|Hard| |1339|Maximum Product of Splitted Binary Tree|47.70%|Medium| |1338|Reduce Array Size to The Half|69.20%|Medium| |1337|The K Weakest Rows in a Matrix|71.40%|Easy| |1336|Number of Transactions per Visit *|48.10%|Hard| |1335|Minimum Difficulty of a Job Schedule|58.30%|Hard| |1334|Find the City With the Smallest Number of Neighbors at a Threshold Distance|57.70%|Medium| |1333|"Filter Restaurants by Vegan-Friendly| Price and Distance"|60.50%| |1332|Remove Palindromic Subsequences|76.20%|Easy| |1331|Rank Transform of an Array|59.80%|Easy| |1330|Reverse Subarray To Maximize Array Value|41.30%|Hard| |1329|Sort the Matrix Diagonally|83.00%|Medium| |1328|Break a Palindrome|52.10%|Medium| |1327|List the Products Ordered in a Period *|71.90%|Easy| |1326|Minimum Number of Taps to Open to Water a Garden|51.60%|Hard| |1325|Delete Leaves With a Given Value|74.40%|Medium| |1324|Print Words Vertically|62.40%|Medium| |1323|Maximum 69 Number|82.00%|Easy| |1322|Ads Performance * $|60.10%|Easy| |1321|Restaurant Growth *|53.40%|Medium| |1320|Minimum Distance to Type a Word Using Two Fingers|59.80%|Hard| |1319|Number of Operations to Make Network Connected|58.50%|Medium| |1318|Minimum Flips to Make a OR b Equal to c|66.00%|Medium| |1317|Convert Integer to the Sum of Two No-Zero Integers|56.00%|Easy| |1316|Distinct Echo Substrings|49.70%|Hard| |1315|Sum of Nodes with Even-Valued Grandparent|85.60%|Medium| |1314|Matrix Block Sum|75.40%|Medium| |1313|Decompress Run-Length Encoded List|85.90%|Easy| |1312|Minimum Insertion Steps to Make a String Palindrome|65.70%|Hard| |1311|Get Watched Videos by Your Friends|45.90%|Medium| |1310|XOR Queries of a Subarray|72.20%|Medium| |1309|Decrypt String from Alphabet to Integer Mapping|79.50%|Easy| |1308|Running Total for Different Genders * $|88.20%|Medium| |1307|Verbal Arithmetic Puzzle|34.80%|Hard| |1306|Jump Game III|63.10%|Medium| |1305|All Elements in Two Binary Search Trees|79.80%|Medium| |1304|Find N Unique Integers Sum up to Zero|77.10%|Easy| |1303|Find the Team Size * $|90.80%|Easy| |1302|Deepest Leaves Sum|86.90%|Medium| |1301|Number of Paths with Max Score|38.70%|Hard| |1300|Sum of Mutated Array Closest to Target|43.10%|Medium| |1299|Replace Elements with Greatest Element on Right Side|74.70%|Easy| |1298|Maximum Candies You Can Get from Boxes|60.90%|Hard| |1297|Maximum Number of Occurrences of a Substring|52.00%|Medium| |1296|Divide Array in Sets of K Consecutive Numbers|56.60%|Medium| |1295|Find Numbers with Even Number of Digits|77.00%|Easy| |1294|Weather Type in Each Country * $|68.00%|Easy| |1293|Shortest Path in a Grid with Obstacles Elimination|45.60%|Hard| |1292|Maximum Side Length of a Square with Sum Less than or Equal to Threshold|52.10%|Medium| |1291|Sequential Digits|60.90%|Medium| |1290|Convert Binary Number in a Linked List to Integer|82.70%|Easy| |1289|Minimum Falling Path Sum II|61.20%|Hard| |1288|Remove Covered Intervals|57.40%|Medium| |1287|Element Appearing More Than 25% In Sorted Array|59.50%|Easy| |1286|Iterator for Combination|73.20%|Medium| |1285|Find the Start and End Number of Continuous Ranges * $|88.30%|Medium| |1284|Minimum Number of Flips to Convert Binary Matrix to Zero Matrix|72.00%|Hard| |1283|Find the Smallest Divisor Given a Threshold|53.70%|Medium| |1282|Group the People Given the Group Size They Belong To|85.20%|Medium| |1281|Subtract the Product and Sum of Digits of an Integer|86.30%|Easy| |1280|Students and Examinations * $|74.60%|Easy| |1279|Traffic Light Controlled Intersection ~ $|75.30%|Easy| |1278|Palindrome Partitioning III|60.90%|Hard| |1277|Count Square Submatrices with All Ones|74.20%|Medium| |1276|Number of Burgers with No Waste of Ingredients|50.60%|Medium| |1275|Find Winner on a Tic Tac Toe Game|54.90%|Easy| |1274|Number of Ships in a Rectangle $|68.60%|Hard| |1273|Delete Tree Nodes $|61.20%|Medium| |1272|Remove Interval $|61.10%|Medium| |1271|Hexspeak $|56.30%|Easy| |1270|All People Report to the Given Manager * $|88.10%|Medium| |1269|Number of Ways to Stay in the Same Place After Some Steps|43.40%|Hard| |1268|Search Suggestions System|65.40%|Medium| |1267|Count Servers that Communicate|58.30%|Medium| |1266|Minimum Time Visiting All Points|79.20%|Easy| |1265|Print Immutable Linked List in Reverse $|94.30%|Medium| |1264|Page Recommendations * $|67.70%|Medium| |1263|[Minimum Moves to Move a Box to Their Target Location](https://github.com/grandyang/
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR
Security Score
Audited on Mar 27, 2026
