diff --git a/README.md b/README.md index 9fee447dd..195daf598 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,16 @@ LeetCode Problems' Solutions | # | Title | Solution | Difficulty | | :-: | - | - | :-: | +| 1178 | [Number of Valid Words for Each Puzzle](https://leetcode.com/problems/number-of-valid-words-for-each-puzzle "猜字谜") | [Go](https://github.com/openset/leetcode/tree/master/problems/number-of-valid-words-for-each-puzzle) | Hard | +| 1177 | [Can Make Palindrome from Substring](https://leetcode.com/problems/can-make-palindrome-from-substring "构建回文串检测") | [Go](https://github.com/openset/leetcode/tree/master/problems/can-make-palindrome-from-substring) | Medium | +| 1176 | [Diet Plan Performance](https://leetcode.com/problems/diet-plan-performance "健身计划评估") | [Go](https://github.com/openset/leetcode/tree/master/problems/diet-plan-performance) | Easy | +| 1175 | [Prime Arrangements](https://leetcode.com/problems/prime-arrangements "质数排列") | [Go](https://github.com/openset/leetcode/tree/master/problems/prime-arrangements) | Easy | +| 1174 | [Immediate Food Delivery II](https://leetcode.com/problems/immediate-food-delivery-ii) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/immediate-food-delivery-ii) | Medium | +| 1173 | [Immediate Food Delivery I](https://leetcode.com/problems/immediate-food-delivery-i) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/immediate-food-delivery-i) | Easy | | 1172 | [Dinner Plate Stacks](https://leetcode.com/problems/dinner-plate-stacks "餐盘栈") | [Go](https://github.com/openset/leetcode/tree/master/problems/dinner-plate-stacks) | Hard | | 1171 | [Remove Zero Sum Consecutive Nodes from Linked List](https://leetcode.com/problems/remove-zero-sum-consecutive-nodes-from-linked-list "从链表中删去总和值为零的连续节点") | [Go](https://github.com/openset/leetcode/tree/master/problems/remove-zero-sum-consecutive-nodes-from-linked-list) | Medium | | 1170 | [Compare Strings by Frequency of the Smallest Character](https://leetcode.com/problems/compare-strings-by-frequency-of-the-smallest-character "比较字符串最小字母出现频次") | [Go](https://github.com/openset/leetcode/tree/master/problems/compare-strings-by-frequency-of-the-smallest-character) | Easy | -| 1169 | [Invalid Transactions](https://leetcode.com/problems/invalid-transactions "查询无效交易") | [Go](https://github.com/openset/leetcode/tree/master/problems/invalid-transactions) | Easy | +| 1169 | [Invalid Transactions](https://leetcode.com/problems/invalid-transactions "查询无效交易") | [Go](https://github.com/openset/leetcode/tree/master/problems/invalid-transactions) | Medium | | 1168 | [Optimize Water Distribution in a Village](https://leetcode.com/problems/optimize-water-distribution-in-a-village "水资源分配优化") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/optimize-water-distribution-in-a-village) | Hard | | 1167 | [Minimum Cost to Connect Sticks](https://leetcode.com/problems/minimum-cost-to-connect-sticks "连接棒材的最低费用") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/minimum-cost-to-connect-sticks) | Medium | | 1166 | [Design File System](https://leetcode.com/problems/design-file-system "设计文件系统") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/design-file-system) | Medium | diff --git a/problems/best-time-to-buy-and-sell-stock-ii/README.md b/problems/best-time-to-buy-and-sell-stock-ii/README.md index a379f0e32..4257b8cc1 100644 --- a/problems/best-time-to-buy-and-sell-stock-ii/README.md +++ b/problems/best-time-to-buy-and-sell-stock-ii/README.md @@ -44,8 +44,8 @@ Explanation: In this case, no transaction is done, i.e. max profit = 0. ### Related Topics - [[Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] + [[Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] ### Similar Questions 1. [Best Time to Buy and Sell Stock](https://github.com/openset/leetcode/tree/master/problems/best-time-to-buy-and-sell-stock) (Easy) diff --git a/problems/can-make-palindrome-from-substring/README.md b/problems/can-make-palindrome-from-substring/README.md new file mode 100644 index 000000000..054f2c79c --- /dev/null +++ b/problems/can-make-palindrome-from-substring/README.md @@ -0,0 +1,76 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/diet-plan-performance "Diet Plan Performance") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/number-of-valid-words-for-each-puzzle "Number of Valid Words for Each Puzzle") + +## 5175. Can Make Palindrome from Substring (Medium) + +

Given a string s, we make queries on substrings of s.

+ +

For each query queries[i] = [left, right, k], we may rearrange the substring s[left], ..., s[right], and then choose up to k of them to replace with any lowercase English letter. 

+ +

If the substring is possible to be a palindrome string after the operations above, the result of the query is true. Otherwise, the result is false.

+ +

Return an array answer[], where answer[i] is the result of the i-th query queries[i].

+ +

Note that: Each letter is counted individually for replacement so if for example s[left..right] = "aaa", and k = 2, we can only replace two of the letters.  (Also, note that the initial string s is never modified by any query.)

+ +

 

+

Example :

+ +
+Input: s = "abcda", queries = [[3,3,0],[1,2,0],[0,3,1],[0,3,2],[0,4,1]]
+Output: [true,false,false,true,true]
+Explanation:
+queries[0] : substring = "d", is palidrome.
+queries[1] : substring = "bc", is not palidrome.
+queries[2] : substring = "abcd", is not palidrome after replacing only 1 character.
+queries[3] : substring = "abcd", could be changed to "abba" which is palidrome. Also this can be changed to "baab" first rearrange it "bacd" then replace "cd" with "ab".
+queries[4] : substring = "abcda", could be changed to "abcba" which is palidrome.
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] + [[String](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] + +### Hints +
+Hint 1 +Since we can rearrange the substring, all we care about is the frequency of each character in that substring. +
+ +
+Hint 2 +How to find the character frequencies efficiently ? +
+ +
+Hint 3 +As a preprocess, calculate the accumulate frequency of all characters for all prefixes of the string. +
+ +
+Hint 4 +How to check if a substring can be changed to a palindrome given its characters frequency ? +
+ +
+Hint 5 +Count the number of odd frequencies, there can be at most one odd frequency in a palindrome. +
diff --git a/problems/construct-binary-tree-from-inorder-and-postorder-traversal/README.md b/problems/construct-binary-tree-from-inorder-and-postorder-traversal/README.md index 85ab5a8a9..f2c5a0b2d 100644 --- a/problems/construct-binary-tree-from-inorder-and-postorder-traversal/README.md +++ b/problems/construct-binary-tree-from-inorder-and-postorder-traversal/README.md @@ -33,9 +33,9 @@ postorder = [9,15,7,20,3] ### Related Topics + [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[Tree](https://github.com/openset/leetcode/tree/master/tag/tree/README.md)] [[Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] - [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] ### Similar Questions 1. [Construct Binary Tree from Preorder and Inorder Traversal](https://github.com/openset/leetcode/tree/master/problems/construct-binary-tree-from-preorder-and-inorder-traversal) (Medium) diff --git a/problems/construct-binary-tree-from-preorder-and-inorder-traversal/README.md b/problems/construct-binary-tree-from-preorder-and-inorder-traversal/README.md index f3cf9a022..c90d2163c 100644 --- a/problems/construct-binary-tree-from-preorder-and-inorder-traversal/README.md +++ b/problems/construct-binary-tree-from-preorder-and-inorder-traversal/README.md @@ -32,9 +32,9 @@ inorder = [9,3,15,20,7] 15 7 ### Related Topics + [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[Tree](https://github.com/openset/leetcode/tree/master/tag/tree/README.md)] [[Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] - [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] ### Similar Questions 1. [Construct Binary Tree from Inorder and Postorder Traversal](https://github.com/openset/leetcode/tree/master/problems/construct-binary-tree-from-inorder-and-postorder-traversal) (Medium) diff --git a/problems/convert-sorted-list-to-binary-search-tree/README.md b/problems/convert-sorted-list-to-binary-search-tree/README.md index 7e011589c..e9e43f0a0 100644 --- a/problems/convert-sorted-list-to-binary-search-tree/README.md +++ b/problems/convert-sorted-list-to-binary-search-tree/README.md @@ -30,8 +30,8 @@ One possible answer is: [0,-3,9,-10,null,5], which represents the following heig ### Related Topics - [[Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md)] + [[Depth-first Search](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] ### Similar Questions 1. [Convert Sorted Array to Binary Search Tree](https://github.com/openset/leetcode/tree/master/problems/convert-sorted-array-to-binary-search-tree) (Easy) diff --git a/problems/design-file-system/README.md b/problems/design-file-system/README.md index 237a41434..a21ce7016 100644 --- a/problems/design-file-system/README.md +++ b/problems/design-file-system/README.md @@ -14,8 +14,8 @@ ### Related Topics - [[Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] [[Design](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] + [[Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] ### Hints
diff --git a/problems/diet-plan-performance/README.md b/problems/diet-plan-performance/README.md new file mode 100644 index 000000000..26421deaf --- /dev/null +++ b/problems/diet-plan-performance/README.md @@ -0,0 +1,67 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/prime-arrangements "Prime Arrangements") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/can-make-palindrome-from-substring "Can Make Palindrome from Substring") + +## 5174. Diet Plan Performance (Easy) + +

A dieter consumes calories[i] calories on the i-th day.  For every consecutive sequence of k days, they look at T, the total calories consumed during that sequence of k days:

+ + + +

Return the total number of points the dieter has after all calories.length days.

+ +

Note that: The total points could be negative.

+ +

 

+

Example 1:

+ +
+Input: calories = [1,2,3,4,5], k = 1, lower = 3, upper = 3
+Output: 0
+Explaination: calories[0], calories[1] < lower and calories[3], calories[4] > upper, total points = 0.
+ +

Example 2:

+ +
+Input: calories = [3,2], k = 2, lower = 0, upper = 1
+Output: 1
+Explaination: calories[0] + calories[1] > upper, total points = 1.
+
+ +

Example 3:

+ +
+Input: calories = [6,5,0,0], k = 2, lower = 1, upper = 5
+Output: 0
+Explaination: calories[0] + calories[1] > upper, calories[2] + calories[3] < lower, total points = 0.
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] + [[Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md)] + +### Hints +
+Hint 1 +Use sliding window technique (aka two pointers). +
diff --git a/problems/dinner-plate-stacks/README.md b/problems/dinner-plate-stacks/README.md index 7d406d328..fcb54d431 100644 --- a/problems/dinner-plate-stacks/README.md +++ b/problems/dinner-plate-stacks/README.md @@ -7,7 +7,7 @@ [< Previous](https://github.com/openset/leetcode/tree/master/problems/remove-zero-sum-consecutive-nodes-from-linked-list "Remove Zero Sum Consecutive Nodes from Linked List")                  -Next > +[Next >](https://github.com/openset/leetcode/tree/master/problems/immediate-food-delivery-i "Immediate Food Delivery I") ## 1172. Dinner Plate Stacks (Hard) diff --git a/problems/immediate-food-delivery-i/README.md b/problems/immediate-food-delivery-i/README.md new file mode 100644 index 000000000..2db2d0bff --- /dev/null +++ b/problems/immediate-food-delivery-i/README.md @@ -0,0 +1,14 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/dinner-plate-stacks "Dinner Plate Stacks") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/immediate-food-delivery-ii "Immediate Food Delivery II") + +## 1173. Immediate Food Delivery I (Easy) + + diff --git a/problems/immediate-food-delivery-i/mysql_schemas.sql b/problems/immediate-food-delivery-i/mysql_schemas.sql new file mode 100644 index 000000000..25d9e735c --- /dev/null +++ b/problems/immediate-food-delivery-i/mysql_schemas.sql @@ -0,0 +1,8 @@ +Create table If Not Exists Delivery (delivery_id int, customer_id int, order_date date, customer_pref_delivery_date date); +Truncate table Delivery; +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('1', '1', '2019-08-01', '2019-08-02'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('2', '5', '2019-08-02', '2019-08-02'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('3', '1', '2019-08-11', '2019-08-11'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('4', '3', '2019-08-24', '2019-08-26'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('5', '4', '2019-08-21', '2019-08-22'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('6', '2', '2019-08-11', '2019-08-13'); diff --git a/problems/immediate-food-delivery-ii/README.md b/problems/immediate-food-delivery-ii/README.md new file mode 100644 index 000000000..c13241896 --- /dev/null +++ b/problems/immediate-food-delivery-ii/README.md @@ -0,0 +1,14 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/immediate-food-delivery-i "Immediate Food Delivery I") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/prime-arrangements "Prime Arrangements") + +## 1174. Immediate Food Delivery II (Medium) + + diff --git a/problems/immediate-food-delivery-ii/mysql_schemas.sql b/problems/immediate-food-delivery-ii/mysql_schemas.sql new file mode 100644 index 000000000..da8430ded --- /dev/null +++ b/problems/immediate-food-delivery-ii/mysql_schemas.sql @@ -0,0 +1,9 @@ +Create table If Not Exists Delivery (delivery_id int, customer_id int, order_date date, customer_pref_delivery_date date); +Truncate table Delivery; +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('1', '1', '2019-08-01', '2019-08-02'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('2', '2', '2019-08-02', '2019-08-02'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('3', '1', '2019-08-11', '2019-08-12'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('4', '3', '2019-08-24', '2019-08-24'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('5', '3', '2019-08-21', '2019-08-22'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('6', '2', '2019-08-11', '2019-08-13'); +insert into Delivery (delivery_id, customer_id, order_date, customer_pref_delivery_date) values ('7', '4', '2019-08-09', '2019-08-09'); diff --git a/problems/is-subsequence/README.md b/problems/is-subsequence/README.md index 41b8143b8..0d1db3e6e 100644 --- a/problems/is-subsequence/README.md +++ b/problems/is-subsequence/README.md @@ -9,7 +9,7 @@                  [Next >](https://github.com/openset/leetcode/tree/master/problems/utf-8-validation "UTF-8 Validation") -## 392. Is Subsequence (Medium) +## 392. Is Subsequence (Easy)

Given a string s and a string t, check if s is subsequence of t. diff --git a/problems/longest-consecutive-sequence/README.md b/problems/longest-consecutive-sequence/README.md index 43b0bd141..257addc45 100644 --- a/problems/longest-consecutive-sequence/README.md +++ b/problems/longest-consecutive-sequence/README.md @@ -24,8 +24,8 @@ ### Related Topics - [[Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)] [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] + [[Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)] ### Similar Questions 1. [Binary Tree Longest Consecutive Sequence](https://github.com/openset/leetcode/tree/master/problems/binary-tree-longest-consecutive-sequence) (Medium) diff --git a/problems/number-of-matching-subsequences/README.md b/problems/number-of-matching-subsequences/README.md index 16088cb2e..e9f907ce6 100644 --- a/problems/number-of-matching-subsequences/README.md +++ b/problems/number-of-matching-subsequences/README.md @@ -35,4 +35,4 @@ words = ["a", "bb", "acd", "ace"] [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] ### Similar Questions - 1. [Is Subsequence](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) (Medium) + 1. [Is Subsequence](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) (Easy) diff --git a/problems/number-of-valid-words-for-each-puzzle/README.md b/problems/number-of-valid-words-for-each-puzzle/README.md new file mode 100644 index 000000000..3026be55d --- /dev/null +++ b/problems/number-of-valid-words-for-each-puzzle/README.md @@ -0,0 +1,68 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/can-make-palindrome-from-substring "Can Make Palindrome from Substring") +                 +Next > + +## 5176. Number of Valid Words for Each Puzzle (Hard) + +With respect to a given puzzle string, a word is valid if both the following conditions are satisfied: +

+Return an array answer, where answer[i] is the number of words in the given word list words that are valid with respect to the puzzle puzzles[i]. +

 

+

Example :

+ +
+Input: 
+words = ["aaaa","asas","able","ability","actt","actor","access"], 
+puzzles = ["aboveyz","abrodyz","abslute","absoryz","actresz","gaswxyz"]
+Output: [1,1,3,2,4,0]
+Explanation:
+1 valid word for "aboveyz" : "aaaa" 
+1 valid word for "abrodyz" : "aaaa"
+3 valid words for "abslute" : "aaaa", "asas", "able"
+2 valid words for "absoryz" : "aaaa", "asas"
+4 valid words for "actresz" : "aaaa", "asas", "actt", "access"
+There're no valid words for "gaswxyz" cause none of the words in the list contains letter 'g'.
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] + [[Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] + +### Hints +
+Hint 1 +Exploit the fact that the length of the puzzle is only 7. +
+ +
+Hint 2 +Use bit-masks to represent the word and puzzle strings. +
+ +
+Hint 3 +For each puzzle, count the number of words whose bit-mask is a sub-mask of the puzzle's bit-mask. +
diff --git a/problems/prime-arrangements/README.md b/problems/prime-arrangements/README.md new file mode 100644 index 000000000..d9bd60bb0 --- /dev/null +++ b/problems/prime-arrangements/README.md @@ -0,0 +1,60 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/immediate-food-delivery-ii "Immediate Food Delivery II") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/diet-plan-performance "Diet Plan Performance") + +## 5173. Prime Arrangements (Easy) + +

Return the number of permutations of 1 to n so that prime numbers are at prime indices (1-indexed.)

+ +

(Recall that an integer is prime if and only if it is greater than 1, and cannot be written as a product of two positive integers both smaller than it.)

+ +

Since the answer may be large, return the answer modulo 10^9 + 7.

+ +

 

+

Example 1:

+ +
+Input: n = 5
+Output: 12
+Explanation: For example [1,2,5,4,3] is a valid permutation, but [5,2,3,4,1] is not because the prime number 5 is at index 1.
+
+ +

Example 2:

+ +
+Input: n = 100
+Output: 682289015
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Math](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] + +### Hints +
+Hint 1 +Solve the problem for prime numbers and composite numbers separately. +
+ +
+Hint 2 +Multiply the number of permutations of prime numbers over prime indices with the number of permutations of composite numbers over composite indices. +
+ +
+Hint 3 +The number of permutations equals the factorial. +
diff --git a/problems/shortest-way-to-form-string/README.md b/problems/shortest-way-to-form-string/README.md index 9e1f8644c..f685c40ed 100644 --- a/problems/shortest-way-to-form-string/README.md +++ b/problems/shortest-way-to-form-string/README.md @@ -55,7 +55,7 @@ [[Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] ### Similar Questions - 1. [Is Subsequence](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) (Medium) + 1. [Is Subsequence](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) (Easy) ### Hints
diff --git a/problems/two-sum-iii-data-structure-design/README.md b/problems/two-sum-iii-data-structure-design/README.md index 3f8f33cc8..e4a53a3f4 100644 --- a/problems/two-sum-iii-data-structure-design/README.md +++ b/problems/two-sum-iii-data-structure-design/README.md @@ -14,8 +14,8 @@ ### Related Topics - [[Design](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] [[Hash Table](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] + [[Design](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] ### Similar Questions 1. [Two Sum](https://github.com/openset/leetcode/tree/master/problems/two-sum) (Easy) diff --git a/problems/word-ladder-ii/README.md b/problems/word-ladder-ii/README.md index 445628286..4335d1576 100644 --- a/problems/word-ladder-ii/README.md +++ b/problems/word-ladder-ii/README.md @@ -60,10 +60,10 @@ wordList = ["hot","dot","dog","lot",&quo ### Related Topics - [[Breadth-first Search](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[String](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] [[Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] + [[Breadth-first Search](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] ### Similar Questions 1. [Word Ladder](https://github.com/openset/leetcode/tree/master/problems/word-ladder) (Medium) diff --git a/tag/README.md b/tag/README.md index a033d3739..2424c5259 100644 --- a/tag/README.md +++ b/tag/README.md @@ -16,10 +16,10 @@ | 9 | [Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md) | [贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md) | | 10 | [Two Pointers](https://github.com/openset/leetcode/tree/master/tag/two-pointers/README.md) | [双指针](https://github.com/openset/leetcode/tree/master/tag/two-pointers/README.md) | | 11 | [Breadth-first Search](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md) | [广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md) | | 12 | [Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md) | [栈](https://github.com/openset/leetcode/tree/master/tag/stack/README.md) | | 13 | [Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md) | [回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md) | | 14 | [Design](https://github.com/openset/leetcode/tree/master/tag/design/README.md) | [设计](https://github.com/openset/leetcode/tree/master/tag/design/README.md) | -| 15 | [Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md) | [链表](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md) | | 16 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | [图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | -| 17 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | [排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | | 18 | [Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md) | [位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md) | +| 15 | [Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md) | [链表](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md) | | 16 | [Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md) | [位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md) | +| 17 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | [图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | | 18 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | [排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | | 19 | [Heap](https://github.com/openset/leetcode/tree/master/tag/heap/README.md) | [堆](https://github.com/openset/leetcode/tree/master/tag/heap/README.md) | | 20 | [Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md) | [并查集](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md) | -| 21 | [Divide and Conquer](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md) | [分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md) | | 22 | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | +| 21 | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | | 22 | [Divide and Conquer](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md) | [分治算法](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md) | | 23 | [Trie](https://github.com/openset/leetcode/tree/master/tag/trie/README.md) | [字典树](https://github.com/openset/leetcode/tree/master/tag/trie/README.md) | | 24 | [Recursion](https://github.com/openset/leetcode/tree/master/tag/recursion/README.md) | [递归](https://github.com/openset/leetcode/tree/master/tag/recursion/README.md) | | 25 | [Segment Tree](https://github.com/openset/leetcode/tree/master/tag/segment-tree/README.md) | [线段树](https://github.com/openset/leetcode/tree/master/tag/segment-tree/README.md) | | 26 | [Ordered Map](https://github.com/openset/leetcode/tree/master/tag/ordered-map/README.md) | [Ordered Map](https://github.com/openset/leetcode/tree/master/tag/ordered-map/README.md) | | 27 | [Queue](https://github.com/openset/leetcode/tree/master/tag/queue/README.md) | [队列](https://github.com/openset/leetcode/tree/master/tag/queue/README.md) | | 28 | [Minimax](https://github.com/openset/leetcode/tree/master/tag/minimax/README.md) | [极小化极大](https://github.com/openset/leetcode/tree/master/tag/minimax/README.md) | diff --git a/tag/array/README.md b/tag/array/README.md index d06498ed1..39274b492 100644 --- a/tag/array/README.md +++ b/tag/array/README.md @@ -9,6 +9,10 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 5175 | [构建回文串检测](https://github.com/openset/leetcode/tree/master/problems/can-make-palindrome-from-substring) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Medium | +| 5174 | [健身计划评估](https://github.com/openset/leetcode/tree/master/problems/diet-plan-performance) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md)] | Easy | +| 1170 | [比较字符串最小字母出现频次](https://github.com/openset/leetcode/tree/master/problems/compare-strings-by-frequency-of-the-smallest-character) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | +| 1169 | [查询无效交易](https://github.com/openset/leetcode/tree/master/problems/invalid-transactions) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | | 1160 | [拼写单词](https://github.com/openset/leetcode/tree/master/problems/find-words-that-can-be-formed-by-characters) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Easy | | 1152 | [用户网站访问行为分析](https://github.com/openset/leetcode/tree/master/problems/analyze-user-website-visit-pattern) 🔒 | [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)] [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Medium | | 1151 | [最少交换次数来组合所有的 1](https://github.com/openset/leetcode/tree/master/problems/minimum-swaps-to-group-all-1s-together) 🔒 | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md)] | Medium | diff --git a/tag/binary-search/README.md b/tag/binary-search/README.md index b5b3dc09f..e1f61cfd9 100644 --- a/tag/binary-search/README.md +++ b/tag/binary-search/README.md @@ -45,7 +45,7 @@ | 441 | [排列硬币](https://github.com/openset/leetcode/tree/master/problems/arranging-coins) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy | | 436 | [寻找右区间](https://github.com/openset/leetcode/tree/master/problems/find-right-interval) | [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Medium | | 410 | [分割数组的最大值](https://github.com/openset/leetcode/tree/master/problems/split-array-largest-sum) | [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | -| 392 | [判断子序列](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | +| 392 | [判断子序列](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Easy | | 378 | [有序矩阵中第K小的元素](https://github.com/openset/leetcode/tree/master/problems/kth-smallest-element-in-a-sorted-matrix) | [[堆](https://github.com/openset/leetcode/tree/master/tag/heap/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Medium | | 374 | [猜数字大小](https://github.com/openset/leetcode/tree/master/problems/guess-number-higher-or-lower) | [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy | | 367 | [有效的完全平方数](https://github.com/openset/leetcode/tree/master/problems/valid-perfect-square) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy | diff --git a/tag/bit-manipulation/README.md b/tag/bit-manipulation/README.md index 1c1a79ce2..ad564e63a 100644 --- a/tag/bit-manipulation/README.md +++ b/tag/bit-manipulation/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 5176 | [猜字谜](https://github.com/openset/leetcode/tree/master/problems/number-of-valid-words-for-each-puzzle) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Hard | | 1125 | [最小的必要团队](https://github.com/openset/leetcode/tree/master/problems/smallest-sufficient-team) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | | 898 | [子数组按位或操作](https://github.com/openset/leetcode/tree/master/problems/bitwise-ors-of-subarrays) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 784 | [字母大小写全排列](https://github.com/openset/leetcode/tree/master/problems/letter-case-permutation) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Easy | diff --git a/tag/design/README.md b/tag/design/README.md index 241f65b22..06084d34e 100644 --- a/tag/design/README.md +++ b/tag/design/README.md @@ -9,6 +9,8 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1172 | [餐盘栈](https://github.com/openset/leetcode/tree/master/problems/dinner-plate-stacks) | [[设计](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] | Hard | +| 1166 | [设计文件系统](https://github.com/openset/leetcode/tree/master/problems/design-file-system) 🔒 | [[设计](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Medium | | 716 | [最大栈](https://github.com/openset/leetcode/tree/master/problems/max-stack) 🔒 | [[设计](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] | Easy | | 707 | [设计链表](https://github.com/openset/leetcode/tree/master/problems/design-linked-list) | [[设计](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] [[链表](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md)] | Easy | | 706 | [设计哈希映射](https://github.com/openset/leetcode/tree/master/problems/design-hashmap) | [[设计](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Easy | diff --git a/tag/dynamic-programming/README.md b/tag/dynamic-programming/README.md index eeec9d26d..709e19a3a 100644 --- a/tag/dynamic-programming/README.md +++ b/tag/dynamic-programming/README.md @@ -105,7 +105,7 @@ | 413 | [等差数列划分](https://github.com/openset/leetcode/tree/master/problems/arithmetic-slices) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 410 | [分割数组的最大值](https://github.com/openset/leetcode/tree/master/problems/split-array-largest-sum) | [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | | 403 | [青蛙过河](https://github.com/openset/leetcode/tree/master/problems/frog-jump) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | -| 392 | [判断子序列](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | +| 392 | [判断子序列](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Easy | | 377 | [组合总和 Ⅳ](https://github.com/openset/leetcode/tree/master/problems/combination-sum-iv) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 376 | [摆动序列](https://github.com/openset/leetcode/tree/master/problems/wiggle-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 375 | [猜数字大小 II](https://github.com/openset/leetcode/tree/master/problems/guess-number-higher-or-lower-ii) | [[极小化极大](https://github.com/openset/leetcode/tree/master/tag/minimax/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | diff --git a/tag/graph/README.md b/tag/graph/README.md index f0a05a0eb..1f68f7e87 100644 --- a/tag/graph/README.md +++ b/tag/graph/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1168 | [水资源分配优化](https://github.com/openset/leetcode/tree/master/problems/optimize-water-distribution-in-a-village) 🔒 | [[并查集](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)] [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] | Hard | | 1162 | [地图分析](https://github.com/openset/leetcode/tree/master/problems/as-far-from-land-as-possible) | [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] | Medium | | 1161 | [最大层内元素和](https://github.com/openset/leetcode/tree/master/problems/maximum-level-sum-of-a-binary-tree) | [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] | Medium | | 1153 | [字符串转化](https://github.com/openset/leetcode/tree/master/problems/string-transforms-into-another-string) 🔒 | [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] | Hard | diff --git a/tag/greedy/README.md b/tag/greedy/README.md index cb6eb5aef..84fdb5964 100644 --- a/tag/greedy/README.md +++ b/tag/greedy/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1167 | [连接棒材的最低费用](https://github.com/openset/leetcode/tree/master/problems/minimum-cost-to-connect-sticks) 🔒 | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] | Medium | | 1094 | [拼车](https://github.com/openset/leetcode/tree/master/problems/car-pooling) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] | Medium | | 1090 | [受标签影响的最大值](https://github.com/openset/leetcode/tree/master/problems/largest-values-from-labels) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Medium | | 1058 | [最小化舍入误差以满足目标](https://github.com/openset/leetcode/tree/master/problems/minimize-rounding-error-to-meet-target) 🔒 | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | @@ -54,7 +55,7 @@ | 435 | [无重叠区间](https://github.com/openset/leetcode/tree/master/problems/non-overlapping-intervals) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] | Medium | | 406 | [根据身高重建队列](https://github.com/openset/leetcode/tree/master/problems/queue-reconstruction-by-height) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] | Medium | | 402 | [移掉K位数字](https://github.com/openset/leetcode/tree/master/problems/remove-k-digits) | [[栈](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)] [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] | Medium | -| 392 | [判断子序列](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | +| 392 | [判断子序列](https://github.com/openset/leetcode/tree/master/problems/is-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Easy | | 376 | [摆动序列](https://github.com/openset/leetcode/tree/master/problems/wiggle-subsequence) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium | | 358 | [K 距离间隔重排字符串](https://github.com/openset/leetcode/tree/master/problems/rearrange-string-k-distance-apart) 🔒 | [[堆](https://github.com/openset/leetcode/tree/master/tag/heap/README.md)] [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Hard | | 330 | [按要求补齐数组](https://github.com/openset/leetcode/tree/master/problems/patching-array) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] | Hard | diff --git a/tag/hash-table/README.md b/tag/hash-table/README.md index f8e99bf4a..2bc56f593 100644 --- a/tag/hash-table/README.md +++ b/tag/hash-table/README.md @@ -9,6 +9,8 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 5176 | [猜字谜](https://github.com/openset/leetcode/tree/master/problems/number-of-valid-words-for-each-puzzle) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Hard | +| 1166 | [设计文件系统](https://github.com/openset/leetcode/tree/master/problems/design-file-system) 🔒 | [[设计](https://github.com/openset/leetcode/tree/master/tag/design/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Medium | | 1160 | [拼写单词](https://github.com/openset/leetcode/tree/master/problems/find-words-that-can-be-formed-by-characters) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Easy | | 1152 | [用户网站访问行为分析](https://github.com/openset/leetcode/tree/master/problems/analyze-user-website-visit-pattern) 🔒 | [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)] [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Medium | | 1133 | [最大唯一数](https://github.com/openset/leetcode/tree/master/problems/largest-unique-number) 🔒 | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[哈希表](https://github.com/openset/leetcode/tree/master/tag/hash-table/README.md)] | Easy | diff --git a/tag/linked-list/README.md b/tag/linked-list/README.md index 8ec548618..79b24333d 100644 --- a/tag/linked-list/README.md +++ b/tag/linked-list/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1171 | [从链表中删去总和值为零的连续节点](https://github.com/openset/leetcode/tree/master/problems/remove-zero-sum-consecutive-nodes-from-linked-list) | [[链表](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md)] | Medium | | 1019 | [链表中的下一个更大节点](https://github.com/openset/leetcode/tree/master/problems/next-greater-node-in-linked-list) | [[栈](https://github.com/openset/leetcode/tree/master/tag/stack/README.md)] [[链表](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md)] | Medium | | 876 | [链表的中间结点](https://github.com/openset/leetcode/tree/master/problems/middle-of-the-linked-list) | [[链表](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md)] | Easy | | 817 | [链表组件](https://github.com/openset/leetcode/tree/master/problems/linked-list-components) | [[链表](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md)] | Medium | diff --git a/tag/math/README.md b/tag/math/README.md index 1ecbfae04..51fce712d 100644 --- a/tag/math/README.md +++ b/tag/math/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 5173 | [质数排列](https://github.com/openset/leetcode/tree/master/problems/prime-arrangements) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Easy | | 1134 | [阿姆斯特朗数](https://github.com/openset/leetcode/tree/master/problems/armstrong-number) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Easy | | 1121 | [将数组分成几个递增序列](https://github.com/openset/leetcode/tree/master/problems/divide-array-into-increasing-sequences) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Hard | | 1104 | [二叉树寻路](https://github.com/openset/leetcode/tree/master/problems/path-in-zigzag-labelled-binary-tree) | [[树](https://github.com/openset/leetcode/tree/master/tag/tree/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | diff --git a/tag/sliding-window/README.md b/tag/sliding-window/README.md index e8bbc85ed..c7e5a4f8f 100644 --- a/tag/sliding-window/README.md +++ b/tag/sliding-window/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 5174 | [健身计划评估](https://github.com/openset/leetcode/tree/master/problems/diet-plan-performance) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md)] | Easy | | 1151 | [最少交换次数来组合所有的 1](https://github.com/openset/leetcode/tree/master/problems/minimum-swaps-to-group-all-1s-together) 🔒 | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md)] | Medium | | 1100 | [长度为 K 的无重复字符子串](https://github.com/openset/leetcode/tree/master/problems/find-k-length-substrings-with-no-repeated-characters) 🔒 | [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] [[Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md)] | Medium | | 1074 | [元素和为目标值的子矩阵数量](https://github.com/openset/leetcode/tree/master/problems/number-of-submatrices-that-sum-to-target) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] [[Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md)] | Hard | diff --git a/tag/string/README.md b/tag/string/README.md index 9ed6defb5..346572595 100644 --- a/tag/string/README.md +++ b/tag/string/README.md @@ -9,6 +9,10 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 5175 | [构建回文串检测](https://github.com/openset/leetcode/tree/master/problems/can-make-palindrome-from-substring) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Medium | +| 1170 | [比较字符串最小字母出现频次](https://github.com/openset/leetcode/tree/master/problems/compare-strings-by-frequency-of-the-smallest-character) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | +| 1169 | [查询无效交易](https://github.com/openset/leetcode/tree/master/problems/invalid-transactions) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | +| 1165 | [单行键盘](https://github.com/openset/leetcode/tree/master/problems/single-row-keyboard) 🔒 | [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | | 1163 | [按字典序排在最后的子串](https://github.com/openset/leetcode/tree/master/problems/last-substring-in-lexicographical-order) | [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Hard | | 1119 | [删去字符串中的元音](https://github.com/openset/leetcode/tree/master/problems/remove-vowels-from-a-string) 🔒 | [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy | | 1106 | [解析布尔表达式](https://github.com/openset/leetcode/tree/master/problems/parsing-a-boolean-expression) | [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Hard | diff --git a/tag/tags.json b/tag/tags.json index b80e11c49..164139dce 100644 --- a/tag/tags.json +++ b/tag/tags.json @@ -74,6 +74,11 @@ "Slug": "linked-list", "TranslatedName": "链表" }, + { + "Name": "Bit Manipulation", + "Slug": "bit-manipulation", + "TranslatedName": "位运算" + }, { "Name": "Graph", "Slug": "graph", @@ -84,11 +89,6 @@ "Slug": "sort", "TranslatedName": "排序" }, - { - "Name": "Bit Manipulation", - "Slug": "bit-manipulation", - "TranslatedName": "位运算" - }, { "Name": "Heap", "Slug": "heap", @@ -99,16 +99,16 @@ "Slug": "union-find", "TranslatedName": "并查集" }, - { - "Name": "Divide and Conquer", - "Slug": "divide-and-conquer", - "TranslatedName": "分治算法" - }, { "Name": "Sliding Window", "Slug": "sliding-window", "TranslatedName": "Sliding Window" }, + { + "Name": "Divide and Conquer", + "Slug": "divide-and-conquer", + "TranslatedName": "分治算法" + }, { "Name": "Trie", "Slug": "trie", diff --git a/tag/union-find/README.md b/tag/union-find/README.md index 44339ac81..60ba06c74 100644 --- a/tag/union-find/README.md +++ b/tag/union-find/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1168 | [水资源分配优化](https://github.com/openset/leetcode/tree/master/problems/optimize-water-distribution-in-a-village) 🔒 | [[并查集](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)] [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] | Hard | | 1135 | [最低成本联通所有城市](https://github.com/openset/leetcode/tree/master/problems/connecting-cities-with-minimum-cost) 🔒 | [[并查集](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)] [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] | Medium | | 1102 | [得分最高的路径](https://github.com/openset/leetcode/tree/master/problems/path-with-maximum-minimum-value) 🔒 | [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[并查集](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)] [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] | Medium | | 1101 | [彼此熟识的最早时间](https://github.com/openset/leetcode/tree/master/problems/the-earliest-moment-when-everyone-become-friends) 🔒 | [[并查集](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)] | Medium |