From e56da2ab14ada53ecbfd44e5096acf00d287eb9d Mon Sep 17 00:00:00 2001 From: openset Date: Mon, 2 Dec 2019 18:41:00 +0800 Subject: [PATCH] Add: new --- README.md | 4 + .../README.md | 72 +++++++++++++ .../README.md | 101 ++++++++++++++++++ .../README.md | 99 +++++++++++++++++ .../number-of-ships-in-a-rectangle/README.md | 2 +- .../palindrome-partitioning-iii/README.md | 66 ++++++++++++ tag/array/README.md | 2 + tag/depth-first-search/README.md | 1 + tag/divide-and-conquer/README.md | 1 + tag/dynamic-programming/README.md | 3 + tag/greedy/README.md | 1 + tag/line-sweep/README.md | 1 + tag/math/README.md | 3 + tag/string/README.md | 1 + 14 files changed, 356 insertions(+), 1 deletion(-) create mode 100644 problems/count-square-submatrices-with-all-ones/README.md create mode 100644 problems/find-winner-on-a-tic-tac-toe-game/README.md create mode 100644 problems/number-of-burgers-with-no-waste-of-ingredients/README.md create mode 100644 problems/palindrome-partitioning-iii/README.md diff --git a/README.md b/README.md index bdb4c4b56..09eb094bc 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,10 @@ LeetCode Problems' Solutions | # | Title | Solution | Difficulty | | :-: | - | - | :-: | +| 1278 | [Palindrome Partitioning III](https://leetcode.com/problems/palindrome-partitioning-iii "分割回文串 III") | [Go](https://github.com/openset/leetcode/tree/master/problems/palindrome-partitioning-iii) | Hard | +| 1277 | [Count Square Submatrices with All Ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones "统计全为 1 的正方形子矩阵") | [Go](https://github.com/openset/leetcode/tree/master/problems/count-square-submatrices-with-all-ones) | Medium | +| 1276 | [Number of Burgers with No Waste of Ingredients](https://leetcode.com/problems/number-of-burgers-with-no-waste-of-ingredients "不浪费原料的汉堡制作方案") | [Go](https://github.com/openset/leetcode/tree/master/problems/number-of-burgers-with-no-waste-of-ingredients) | Medium | +| 1275 | [Find Winner on a Tic Tac Toe Game](https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game "找出井字棋的获胜者") | [Go](https://github.com/openset/leetcode/tree/master/problems/find-winner-on-a-tic-tac-toe-game) | Easy | | 1274 | [Number of Ships in a Rectangle](https://leetcode.com/problems/number-of-ships-in-a-rectangle "矩形内船只的数目") | [Go](https://github.com/openset/leetcode/tree/master/problems/number-of-ships-in-a-rectangle) | Hard | | 1273 | [Delete Tree Nodes](https://leetcode.com/problems/delete-tree-nodes "删除树节点") | [Go](https://github.com/openset/leetcode/tree/master/problems/delete-tree-nodes) | Medium | | 1272 | [Remove Interval](https://leetcode.com/problems/remove-interval "删除区间") | [Go](https://github.com/openset/leetcode/tree/master/problems/remove-interval) | Medium | diff --git a/problems/count-square-submatrices-with-all-ones/README.md b/problems/count-square-submatrices-with-all-ones/README.md new file mode 100644 index 000000000..d29006e29 --- /dev/null +++ b/problems/count-square-submatrices-with-all-ones/README.md @@ -0,0 +1,72 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/number-of-burgers-with-no-waste-of-ingredients "Number of Burgers with No Waste of Ingredients") + +[Next>](https://github.com/openset/leetcode/tree/master/problems/palindrome-partitioning-iii "Palindrome Partitioning III") + +## [1277. Count Square Submatrices with All Ones (Medium)](https://leetcode.com/problems/count-square-submatrices-with-all-ones "统计全为 1 的正方形子矩阵") + +

Given a m * n matrix of ones and zeros, return how many square submatrices have all ones.

+ + +

Example 1:

+ +
+Input: matrix =
+[
+ [0,1,1,1],
+ [1,1,1,1],
+ [0,1,1,1]
+]
+Output: 15
+Explanation: 
+There are 10 squares of side 1.
+There are 4 squares of side 2.
+There is 1 square of side 3.
+Total number of squares = 10 + 4 + 1 = 15.
+
+ +

Example 2:

+ +
+Input: matrix = 
+[
+ [1,0,1],
+ [1,1,0],
+ [1,1,0]
+]
+Output: 7
+Explanation: 
+There are 6 squares of side 1. 
+There is 1 square of side 2. 
+Total number of squares = 6 + 1 = 7.
+
+ + +

Constraints:

+ + + +### Related Topics + [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] + [[Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] + +### Hints +
+Hint 1 +Create an additive table that counts the sum of elements of submatrix with the superior corner at (0,0). +
+ +
+Hint 2 +Loop over all subsquares in O(n^3) and check if the sum make the whole array to be ones, if it checks then add 1 to the answer. +
diff --git a/problems/find-winner-on-a-tic-tac-toe-game/README.md b/problems/find-winner-on-a-tic-tac-toe-game/README.md new file mode 100644 index 000000000..6779753e8 --- /dev/null +++ b/problems/find-winner-on-a-tic-tac-toe-game/README.md @@ -0,0 +1,101 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/number-of-ships-in-a-rectangle "Number of Ships in a Rectangle") + +[Next>](https://github.com/openset/leetcode/tree/master/problems/number-of-burgers-with-no-waste-of-ingredients "Number of Burgers with No Waste of Ingredients") + +## [1275. Find Winner on a Tic Tac Toe Game (Easy)](https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game "找出井字棋的获胜者") + +

Tic-tac-toe is played by two players A and B on a 3 x 3 grid.

+ +

Here are the rules of Tic-Tac-Toe:

+ + + +

Given an array moves where each element is another array of size 2 corresponding to the row and column of the grid where they mark their respective character in the order in which A and B play.

+ +

Return the winner of the game if it exists (A or B), in case the game ends in a draw return "Draw", if there are still movements to play return "Pending".

+ +

You can assume that moves is valid (It follows the rules of Tic-Tac-Toe), the grid is initially empty and A will play first.

+ + +

Example 1:

+ +
+Input: moves = [[0,0],[2,0],[1,1],[2,1],[2,2]]
+Output: "A"
+Explanation: "A" wins, he always plays first.
+"X " "X " "X " "X " "X "
+" " -> " " -> " X " -> " X " -> " X "
+" " "O " "O " "OO " "OOX"
+
+ +

Example 2:

+ +
+Input: moves = [[0,0],[1,1],[0,1],[0,2],[1,0],[2,0]]
+Output: "B"
+Explanation: "B" wins.
+"X " "X " "XX " "XXO" "XXO" "XXO"
+" " -> " O " -> " O " -> " O " -> "XO " -> "XO " 
+" " " " " " " " " " "O "
+
+ +

Example 3:

+ +
+Input: moves = [[0,0],[1,1],[2,0],[1,0],[1,2],[2,1],[0,1],[0,2],[2,2]]
+Output: "Draw"
+Explanation: The game ends in a draw since there are no moves to make.
+"XXO"
+"OOX"
+"XOX"
+
+ +

Example 4:

+ +
+Input: moves = [[0,0],[1,1]]
+Output: "Pending"
+Explanation: The game has not finished yet.
+"X "
+" O "
+" "
+
+ + +

Constraints:

+ + + +### Related Topics + [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] + +### Hints +
+Hint 1 +It's straightforward to check if A or B won or not, check for each row/column/diag if all the three are the same. +
+ +
+Hint 2 +Then if no one wins, the game is a draw iff the board is full, i.e. moves.length = 9 otherwise is pending. +
diff --git a/problems/number-of-burgers-with-no-waste-of-ingredients/README.md b/problems/number-of-burgers-with-no-waste-of-ingredients/README.md new file mode 100644 index 000000000..fb6b656c3 --- /dev/null +++ b/problems/number-of-burgers-with-no-waste-of-ingredients/README.md @@ -0,0 +1,99 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/find-winner-on-a-tic-tac-toe-game "Find Winner on a Tic Tac Toe Game") + +[Next>](https://github.com/openset/leetcode/tree/master/problems/count-square-submatrices-with-all-ones "Count Square Submatrices with All Ones") + +## [1276. Number of Burgers with No Waste of Ingredients (Medium)](https://leetcode.com/problems/number-of-burgers-with-no-waste-of-ingredients "不浪费原料的汉堡制作方案") + +

Given two integers tomatoSlices and cheeseSlices. The ingredients of different burgers are as follows:

+ + + +

Return [total_jumbo, total_small] so that the number of remaining tomatoSlices equal to 0 and the number of remaining cheeseSlices equal to 0. If it is not possible to make the remaining tomatoSlices and cheeseSlices equal to 0 return [].

+ + +

Example 1:

+ +
+Input: tomatoSlices = 16, cheeseSlices = 7
+Output: [1,6]
+Explantion: To make one jumbo burger and 6 small burgers we need 4*1 + 2*6 = 16 tomato and 1 + 6 = 7 cheese. There will be no remaining ingredients.
+
+ +

Example 2:

+ +
+Input: tomatoSlices = 17, cheeseSlices = 4
+Output: []
+Explantion: There will be no way to use all ingredients to make small and jumbo burgers.
+
+ +

Example 3:

+ +
+Input: tomatoSlices = 4, cheeseSlices = 17
+Output: []
+Explantion: Making 1 jumbo burger there will be 16 cheese remaining and making 2 small burgers there will be 15 cheese remaining.
+
+ +

Example 4:

+ +
+Input: tomatoSlices = 0, cheeseSlices = 0
+Output: [0,0]
+
+ +

Example 5:

+ +
+Input: tomatoSlices = 2, cheeseSlices = 1
+Output: [0,1]
+
+ + +

Constraints:

+ + + +### Related Topics + [[Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] + [[Math](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] + +### Hints +
+Hint 1 +Can we have an answer if the number of tomatoes is odd ? +
+ +
+Hint 2 +If we have answer will be there multiple answers or just one answer ? +
+ +
+Hint 3 +Let us define number of jumbo burgers as X and number of small burgers as Y +We have to find an x and y in this equation +
+ +
+Hint 4 +1. 4X + 2Y = tomato +
+ +
+Hint 5 +2. X + Y = cheese +
diff --git a/problems/number-of-ships-in-a-rectangle/README.md b/problems/number-of-ships-in-a-rectangle/README.md index 81831b555..179de2fa2 100644 --- a/problems/number-of-ships-in-a-rectangle/README.md +++ b/problems/number-of-ships-in-a-rectangle/README.md @@ -7,7 +7,7 @@ [< Previous](https://github.com/openset/leetcode/tree/master/problems/delete-tree-nodes "Delete Tree Nodes") -Next> +[Next>](https://github.com/openset/leetcode/tree/master/problems/find-winner-on-a-tic-tac-toe-game "Find Winner on a Tic Tac Toe Game") ## [1274. Number of Ships in a Rectangle (Hard)](https://leetcode.com/problems/number-of-ships-in-a-rectangle "矩形内船只的数目") diff --git a/problems/palindrome-partitioning-iii/README.md b/problems/palindrome-partitioning-iii/README.md new file mode 100644 index 000000000..2a6f6908c --- /dev/null +++ b/problems/palindrome-partitioning-iii/README.md @@ -0,0 +1,66 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/count-square-submatrices-with-all-ones "Count Square Submatrices with All Ones") + +Next> + +## [1278. Palindrome Partitioning III (Hard)](https://leetcode.com/problems/palindrome-partitioning-iii "分割回文串 III") + +

You are given a string s containing lowercase letters and an integer k. You need to :

+ + + +

Return the minimal number of characters that you need to change to divide the string.

+ + +

Example 1:

+ +
+Input: s = "abc", k = 2
+Output: 1
+Explanation: You can split the string into "ab" and "c", and change 1 character in "ab" to make it palindrome.
+
+ +

Example 2:

+ +
+Input: s = "aabbc", k = 3
+Output: 0
+Explanation: You can split the string into "aa", "bb" and "c", all of them are palindrome.
+ +

Example 3:

+ +
+Input: s = "leetcode", k = 8
+Output: 0
+
+ + +

Constraints:

+ + + +### Related Topics + [[Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] + +### Hints +
+Hint 1 +For each substring calculate the minimum number of steps to make it palindrome and store it in a table. +
+ +
+Hint 2 +Create a dp(pos, cnt) which means the minimum number of characters changed for the suffix of s starting on pos splitting the suffix on cnt chunks. +
diff --git a/tag/array/README.md b/tag/array/README.md index 718c93833..4273629b6 100644 --- a/tag/array/README.md +++ b/tag/array/README.md @@ -9,6 +9,8 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1277 | [统计全为 1 的正方形子矩阵](https://github.com/openset/leetcode/tree/master/problems/count-square-submatrices-with-all-ones) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | +| 1275 | [找出井字棋的获胜者](https://github.com/openset/leetcode/tree/master/problems/find-winner-on-a-tic-tac-toe-game) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] | Easy | | 1267 | [统计参与通信的服务器](https://github.com/openset/leetcode/tree/master/problems/count-servers-that-communicate) | [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] | Medium | | 1266 | [访问所有点的最小时间](https://github.com/openset/leetcode/tree/master/problems/minimum-time-visiting-all-points) | [[几何](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md)] [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] | Easy | | 1260 | [二维网格迁移](https://github.com/openset/leetcode/tree/master/problems/shift-2d-grid) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] | Easy | diff --git a/tag/depth-first-search/README.md b/tag/depth-first-search/README.md index 3cb39ab00..287f56c0b 100644 --- a/tag/depth-first-search/README.md +++ b/tag/depth-first-search/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1273 | [删除树节点](https://github.com/openset/leetcode/tree/master/problems/delete-tree-nodes) | [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 1254 | [统计封闭岛屿的数目](https://github.com/openset/leetcode/tree/master/problems/number-of-closed-islands) | [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] | Medium | | 1245 | [树的直径](https://github.com/openset/leetcode/tree/master/problems/tree-diameter) 🔒 | [[树](https://github.com/openset/leetcode/tree/master/tag/tree/README.md)] [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Medium | | 1242 | [多线程网页爬虫](https://github.com/openset/leetcode/tree/master/problems/web-crawler-multithreaded) 🔒 | [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Medium | diff --git a/tag/divide-and-conquer/README.md b/tag/divide-and-conquer/README.md index 60dbc0a64..43fa7f252 100644 --- a/tag/divide-and-conquer/README.md +++ b/tag/divide-and-conquer/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1274 | [矩形内船只的数目](https://github.com/openset/leetcode/tree/master/problems/number-of-ships-in-a-rectangle) | [[分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md)] | Hard | | 973 | [最接近原点的 K 个点](https://github.com/openset/leetcode/tree/master/problems/k-closest-points-to-origin) | [[堆](https://github.com/openset/leetcode/tree/master/tag/heap/README.md)] [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)] [[分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md)] | Medium | | 932 | [漂亮数组](https://github.com/openset/leetcode/tree/master/problems/beautiful-array) | [[分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md)] | Medium | | 903 | [DI 序列的有效排列](https://github.com/openset/leetcode/tree/master/problems/valid-permutations-for-di-sequence) | [[分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | diff --git a/tag/dynamic-programming/README.md b/tag/dynamic-programming/README.md index 50536833a..80acb8862 100644 --- a/tag/dynamic-programming/README.md +++ b/tag/dynamic-programming/README.md @@ -9,6 +9,9 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1278 | [分割回文串 III](https://github.com/openset/leetcode/tree/master/problems/palindrome-partitioning-iii) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | +| 1277 | [统计全为 1 的正方形子矩阵](https://github.com/openset/leetcode/tree/master/problems/count-square-submatrices-with-all-ones) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | +| 1273 | [删除树节点](https://github.com/openset/leetcode/tree/master/problems/delete-tree-nodes) | [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 1269 | [停在原地的方案数](https://github.com/openset/leetcode/tree/master/problems/number-of-ways-to-stay-in-the-same-place-after-some-steps) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | | 1262 | [可被三整除的最大和](https://github.com/openset/leetcode/tree/master/problems/greatest-sum-divisible-by-three) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 1259 | [不相交的握手](https://github.com/openset/leetcode/tree/master/problems/handshakes-that-dont-cross) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | diff --git a/tag/greedy/README.md b/tag/greedy/README.md index 7bda7db40..a7dc2558f 100644 --- a/tag/greedy/README.md +++ b/tag/greedy/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1276 | [不浪费原料的汉堡制作方案](https://github.com/openset/leetcode/tree/master/problems/number-of-burgers-with-no-waste-of-ingredients) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | | 1253 | [重构 2 行二进制矩阵](https://github.com/openset/leetcode/tree/master/problems/reconstruct-a-2-row-binary-matrix) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | | 1247 | [交换字符使得字符串相同](https://github.com/openset/leetcode/tree/master/problems/minimum-swaps-to-make-strings-equal) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Medium | | 1231 | [分享巧克力](https://github.com/openset/leetcode/tree/master/problems/divide-chocolate) 🔒 | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Hard | diff --git a/tag/line-sweep/README.md b/tag/line-sweep/README.md index 3c129d642..7ff93a834 100644 --- a/tag/line-sweep/README.md +++ b/tag/line-sweep/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1272 | [删除区间](https://github.com/openset/leetcode/tree/master/problems/remove-interval) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md)] | Medium | | 1229 | [安排会议日程](https://github.com/openset/leetcode/tree/master/problems/meeting-scheduler) 🔒 | [[Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md)] | Medium | | 850 | [矩形面积 II](https://github.com/openset/leetcode/tree/master/problems/rectangle-area-ii) | [[线段树](https://github.com/openset/leetcode/tree/master/tag/segment-tree/README.md)] [[Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md)] | Hard | | 391 | [完美矩形](https://github.com/openset/leetcode/tree/master/problems/perfect-rectangle) | [[Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md)] | Hard | diff --git a/tag/math/README.md b/tag/math/README.md index f3e9bd5da..7f04342fd 100644 --- a/tag/math/README.md +++ b/tag/math/README.md @@ -9,6 +9,9 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1276 | [不浪费原料的汉堡制作方案](https://github.com/openset/leetcode/tree/master/problems/number-of-burgers-with-no-waste-of-ingredients) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | +| 1272 | [删除区间](https://github.com/openset/leetcode/tree/master/problems/remove-interval) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md)] | Medium | +| 1271 | [十六进制魔术数字](https://github.com/openset/leetcode/tree/master/problems/hexspeak) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | | 1259 | [不相交的握手](https://github.com/openset/leetcode/tree/master/problems/handshakes-that-dont-cross) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | | 1256 | [加密数字](https://github.com/openset/leetcode/tree/master/problems/encode-number) 🔒 | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | | 1253 | [重构 2 行二进制矩阵](https://github.com/openset/leetcode/tree/master/problems/reconstruct-a-2-row-binary-matrix) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | diff --git a/tag/string/README.md b/tag/string/README.md index c9b22d9b0..c87d3c819 100644 --- a/tag/string/README.md +++ b/tag/string/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1271 | [十六进制魔术数字](https://github.com/openset/leetcode/tree/master/problems/hexspeak) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | | 1268 | [搜索推荐系统](https://github.com/openset/leetcode/tree/master/problems/search-suggestions-system) | [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Medium | | 1249 | [移除无效的括号](https://github.com/openset/leetcode/tree/master/problems/minimum-remove-to-make-valid-parentheses) | [[栈](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Medium | | 1247 | [交换字符使得字符串相同](https://github.com/openset/leetcode/tree/master/problems/minimum-swaps-to-make-strings-equal) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Medium |

AltStyle によって変換されたページ (->オリジナル) /