|
1003 | 1003 | | 0124 | [二叉树中的最大路径和](https://leetcode.cn/problems/binary-tree-maximum-path-sum/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0124.%20%E4%BA%8C%E5%8F%89%E6%A0%91%E4%B8%AD%E7%9A%84%E6%9C%80%E5%A4%A7%E8%B7%AF%E5%BE%84%E5%92%8C.md) | 树、深度优先搜索、动态规划、二叉树 | 困难 |
|
1004 | 1004 | | 2246 | [相邻字符不同的最长路径](https://leetcode.cn/problems/longest-path-with-different-adjacent-characters/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/2246.%20%E7%9B%B8%E9%82%BB%E5%AD%97%E7%AC%A6%E4%B8%8D%E5%90%8C%E7%9A%84%E6%9C%80%E9%95%BF%E8%B7%AF%E5%BE%84.md) | 树、深度优先搜索、图、拓扑排序、数组、字符串 | 困难 |
|
1005 | 1005 | | 0687 | [最长同值路径](https://leetcode.cn/problems/longest-univalue-path/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0687.%20%E6%9C%80%E9%95%BF%E5%90%8C%E5%80%BC%E8%B7%AF%E5%BE%84.md) | 树、深度优先搜索、二叉树 | 中等 |
|
| 1006 | +| 0310 | [最小高度树](https://leetcode.cn/problems/minimum-height-trees/) | | 深度优先搜索、广度优先搜索、图、拓扑排序 | 中等 | |
1006 | 1007 | | 0337 | [打家劫舍 III](https://leetcode.cn/problems/house-robber-iii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0337.%20%E6%89%93%E5%AE%B6%E5%8A%AB%E8%88%8D%20III.md) | 树、深度优先搜索、动态规划、二叉树 | 中等 |
|
1007 | 1008 | | 0333 | [最大 BST 子树](https://leetcode.cn/problems/largest-bst-subtree/) | | 树、深度优先搜索、二叉搜索树、动态规划、二叉树 | 中等 |
|
1008 | 1009 | | 1617 | [统计子树中城市之间最大距离](https://leetcode.cn/problems/count-subtrees-with-max-distance-between-cities/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/1617.%20%E7%BB%9F%E8%AE%A1%E5%AD%90%E6%A0%91%E4%B8%AD%E5%9F%8E%E5%B8%82%E4%B9%8B%E9%97%B4%E6%9C%80%E5%A4%A7%E8%B7%9D%E7%A6%BB.md) | 位运算、树、动态规划、状态压缩、枚举 | 困难 |
|
1009 | 1010 | | 2538 | [最大价值和与最小价值和的差值](https://leetcode.cn/problems/difference-between-maximum-and-minimum-price-sum/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/2538.%20%E6%9C%80%E5%A4%A7%E4%BB%B7%E5%80%BC%E5%92%8C%E4%B8%8E%E6%9C%80%E5%B0%8F%E4%BB%B7%E5%80%BC%E5%92%8C%E7%9A%84%E5%B7%AE%E5%80%BC.md) | 树、深度优先搜索、数组、动态规划 | 困难 |
|
| 1011 | +| 0834 | [树中距离之和](https://leetcode.cn/problems/sum-of-distances-in-tree/) | | 树、深度优先搜索、图、动态规划 | 困难 | |
| 1012 | +| 1569 | [将子数组重新排序得到同一个二叉搜索树的方案数](https://leetcode.cn/problems/number-of-ways-to-reorder-array-to-get-same-bst/) | | 树、并查集、二叉搜索树、记忆化搜索、数组、数学、分治、动态规划、二叉树、组合数学 | 困难 | |
| 1013 | +| 1372 | [二叉树中的最长交错路径](https://leetcode.cn/problems/longest-zigzag-path-in-a-binary-tree/) | | 树、深度优先搜索、动态规划、二叉树 | 中等 | |
| 1014 | +| 1373 | [二叉搜索子树的最大键值和](https://leetcode.cn/problems/maximum-sum-bst-in-binary-tree/) | | 树、深度优先搜索、二叉搜索树、动态规划、二叉树 | 困难 | |
| 1015 | +| 0968 | [监控二叉树](https://leetcode.cn/problems/binary-tree-cameras/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0968.%20%E7%9B%91%E6%8E%A7%E4%BA%8C%E5%8F%89%E6%A0%91.md) | 树、深度优先搜索、动态规划、二叉树 | 困难 | |
| 1016 | +| 1273 | [删除树节点](https://leetcode.cn/problems/delete-tree-nodes/) | | 树、深度优先搜索、广度优先搜索 | 中等 | |
| 1017 | +| 1519 | [子树中标签相同的节点数](https://leetcode.cn/problems/number-of-nodes-in-the-sub-tree-with-the-same-label/) | | 树、深度优先搜索、广度优先搜索、哈希表、计数 | 中等 | |
1010 | 1018 |
|
1011 | 1019 | ### 状态压缩 DP 题目
|
1012 | 1020 |
|
1013 | 1021 | | 题号 | 标题 | 题解 | 标签 | 难度 |
|
1014 | 1022 | | :------ | :------ | :------ | :------ | :------ |
|
1015 | 1023 | | 0526 | [优美的排列](https://leetcode.cn/problems/beautiful-arrangement/) | | 位运算、数组、动态规划、回溯、状态压缩 | 中等 |
|
| 1024 | +| 0351 | [安卓系统手势解锁](https://leetcode.cn/problems/android-unlock-patterns/) | | 动态规划、回溯 | 中等 | |
1016 | 1025 | | 0464 | [我能赢吗](https://leetcode.cn/problems/can-i-win/) | | 位运算、记忆化搜索、数学、动态规划、状态压缩、博弈 | 中等 |
|
1017 | 1026 | | 0847 | [访问所有节点的最短路径](https://leetcode.cn/problems/shortest-path-visiting-all-nodes/) | | 位运算、广度优先搜索、图、动态规划、状态压缩 | 困难 |
|
| 1027 | +| 0638 | [大礼包](https://leetcode.cn/problems/shopping-offers/) | | 位运算、记忆化搜索、数组、动态规划、回溯、状态压缩 | 中等 | |
1018 | 1028 | | 1994 | [好子集的数目](https://leetcode.cn/problems/the-number-of-good-subsets/) | | 位运算、数组、数学、动态规划、状态压缩 | 困难 |
|
1019 | 1029 | | 0935 | [骑士拨号器](https://leetcode.cn/problems/knight-dialer/) | | 动态规划 | 中等 |
|
1020 | 1030 | | 1349 | [参加考试的最大学生数](https://leetcode.cn/problems/maximum-students-taking-exam/) | | 位运算、数组、动态规划、状态压缩、矩阵 | 困难 |
|
| 1031 | +| 0980 | [不同路径 III](https://leetcode.cn/problems/unique-paths-iii/) | | 位运算、数组、回溯、矩阵 | 困难 | |
| 1032 | +| 0698 | [划分为k个相等的子集](https://leetcode.cn/problems/partition-to-k-equal-sum-subsets/) | | 位运算、记忆化搜索、数组、动态规划、回溯、状态压缩 | 中等 | |
| 1033 | +| 0943 | [最短超级串](https://leetcode.cn/problems/find-the-shortest-superstring/) | | 位运算、数组、字符串、动态规划、状态压缩 | 困难 | |
| 1034 | +| 0691 | [贴纸拼词](https://leetcode.cn/problems/stickers-to-spell-word/) | | 位运算、数组、字符串、动态规划、回溯、状态压缩 | 困难 | |
| 1035 | +| 0982 | [按位与为零的三元组](https://leetcode.cn/problems/triples-with-bitwise-and-equal-to-zero/) | | 位运算、数组、哈希表 | 困难 | |
1021 | 1036 |
|
1022 | 1037 | ### 计数 DP 题目
|
1023 | 1038 |
|
|
1027 | 1042 | | 0063 | [不同路径 II](https://leetcode.cn/problems/unique-paths-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0063.%20%E4%B8%8D%E5%90%8C%E8%B7%AF%E5%BE%84%20II.md) | 数组、动态规划、矩阵 | 中等 |
|
1028 | 1043 | | 0096 | [不同的二叉搜索树](https://leetcode.cn/problems/unique-binary-search-trees/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0096.%20%E4%B8%8D%E5%90%8C%E7%9A%84%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91.md) | 树、二叉搜索树、数学、动态规划、二叉树 | 中等 |
|
1029 | 1044 | | 1259 | [不相交的握手](https://leetcode.cn/problems/handshakes-that-dont-cross/) | | 数学、动态规划 | 困难 |
|
| 1045 | +| 0790 | [多米诺和托米诺平铺](https://leetcode.cn/problems/domino-and-tromino-tiling/) | | 动态规划 | 中等 | |
| 1046 | +| 0070 | [爬楼梯](https://leetcode.cn/problems/climbing-stairs/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0070.%20%E7%88%AC%E6%A5%BC%E6%A2%AF.md) | 记忆化搜索、数学、动态规划 | 简单 | |
| 1047 | +| 0746 | [使用最小花费爬楼梯](https://leetcode.cn/problems/min-cost-climbing-stairs/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0746.%20%E4%BD%BF%E7%94%A8%E6%9C%80%E5%B0%8F%E8%8A%B1%E8%B4%B9%E7%88%AC%E6%A5%BC%E6%A2%AF.md) | 数组、动态规划 | 简单 | |
| 1048 | +| 0509 | [斐波那契数](https://leetcode.cn/problems/fibonacci-number/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0509.%20%E6%96%90%E6%B3%A2%E9%82%A3%E5%A5%91%E6%95%B0.md) | 递归、记忆化搜索、数学、动态规划 | 简单 | |
| 1049 | +| 1137 | [第 N 个泰波那契数](https://leetcode.cn/problems/n-th-tribonacci-number/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/1137.%20%E7%AC%AC%20N%20%E4%B8%AA%E6%B3%B0%E6%B3%A2%E9%82%A3%E5%A5%91%E6%95%B0.md) | 记忆化搜索、数学、动态规划 | 简单 | |
1030 | 1050 |
|
1031 | 1051 | ### 数位 DP 题目
|
1032 | 1052 |
|
1033 | 1053 | | 题号 | 标题 | 题解 | 标签 | 难度 |
|
1034 | 1054 | | :------ | :------ | :------ | :------ | :------ |
|
1035 | 1055 | | 0600 | [不含连续1的非负整数](https://leetcode.cn/problems/non-negative-integers-without-consecutive-ones/) | | 动态规划 | 困难 |
|
1036 | 1056 | | 0233 | [数字 1 的个数](https://leetcode.cn/problems/number-of-digit-one/) | | 递归、数学、动态规划 | 困难 |
|
| 1057 | +| 1012 | [至少有 1 位重复的数字](https://leetcode.cn/problems/numbers-with-repeated-digits/) | | 数学、动态规划 | 困难 | |
1037 | 1058 | | 0902 | [最大为 N 的数字组合](https://leetcode.cn/problems/numbers-at-most-n-given-digit-set/) | | 数组、数学、字符串、二分查找、动态规划 | 困难 |
|
| 1059 | +| 0357 | [统计各位数字都不同的数字个数](https://leetcode.cn/problems/count-numbers-with-unique-digits/) | | 数学、动态规划、回溯 | 中等 | |
1038 | 1060 | | 1015 | [可被 K 整除的最小整数](https://leetcode.cn/problems/smallest-integer-divisible-by-k/) | | 哈希表、数学 | 中等 |
|
| 1061 | +| 0248 | [中心对称数 III](https://leetcode.cn/problems/strobogrammatic-number-iii/) | | 递归、数组、字符串 | 困难 | |
| 1062 | +| 1088 | [易混淆数 II](https://leetcode.cn/problems/confusing-number-ii/) | | 数学、回溯 | 困难 | |
| 1063 | +| 1067 | [范围内的数字计数](https://leetcode.cn/problems/digit-count-in-range/) | | 数学、动态规划 | 困难 | |
| 1064 | +| 面试题 17.06 | [2出现的次数](https://leetcode.cn/problems/number-of-2s-in-range-lcci/) | | 递归、数学、动态规划 | 困难 | |
1039 | 1065 |
|
1040 | 1066 | ### 概率 DP 题目
|
1041 | 1067 |
|
|
1044 | 1070 | | 0688 | [骑士在棋盘上的概率](https://leetcode.cn/problems/knight-probability-in-chessboard/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0688.%20%E9%AA%91%E5%A3%AB%E5%9C%A8%E6%A3%8B%E7%9B%98%E4%B8%8A%E7%9A%84%E6%A6%82%E7%8E%87.md) | 动态规划 | 中等 |
|
1045 | 1071 | | 0808 | [分汤](https://leetcode.cn/problems/soup-servings/) | | 数学、动态规划、概率与统计 | 中等 |
|
1046 | 1072 | | 0837 | [新 21 点](https://leetcode.cn/problems/new-21-game/) | | 数学、动态规划、滑动窗口、概率与统计 | 中等 |
|
| 1073 | +| 1230 | [抛掷硬币](https://leetcode.cn/problems/toss-strange-coins/) | | 数学、动态规划、概率与统计 | 中等 | |
| 1074 | +| 1467 | [两个盒子中球的颜色数相同的概率](https://leetcode.cn/problems/probability-of-a-two-boxes-having-the-same-number-of-distinct-balls/) | | 数组、数学、动态规划、回溯、组合数学、概率与统计 | 困难 | |
| 1075 | +| 1227 | [飞机座位分配概率](https://leetcode.cn/problems/airplane-seat-assignment-probability/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/1227.%20%E9%A3%9E%E6%9C%BA%E5%BA%A7%E4%BD%8D%E5%88%86%E9%85%8D%E6%A6%82%E7%8E%87.md) | 脑筋急转弯、数学、动态规划、概率与统计 | 中等 | |
| 1076 | +| 1377 | [T 秒后青蛙的位置](https://leetcode.cn/problems/frog-position-after-t-seconds/) | | 树、深度优先搜索、广度优先搜索、图 | 困难 | |
| 1077 | +| 剑指 Offer 60 | [n个骰子的点数](https://leetcode.cn/problems/nge-tou-zi-de-dian-shu-lcof/) | | 数学、动态规划、概率与统计 | 中等 | |
1047 | 1078 |
|
1048 | 1079 | ### 动态规划优化题目
|
1049 | 1080 |
|
0 commit comments