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 4257b8cc1..a379f0e32 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
- [[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
[[Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)]
+ [[Array](https://github.com/openset/leetcode/tree/master/tag/array/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/compare-strings-by-frequency-of-the-smallest-character/README.md b/problems/compare-strings-by-frequency-of-the-smallest-character/README.md
new file mode 100644
index 000000000..99b599ed8
--- /dev/null
+++ b/problems/compare-strings-by-frequency-of-the-smallest-character/README.md
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/invalid-transactions "Invalid Transactions")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/remove-zero-sum-consecutive-nodes-from-linked-list "Remove Zero Sum Consecutive Nodes from Linked List")
+
+## 1170. Compare Strings by Frequency of the Smallest Character (Easy)
+
+Let's define a function f(s)
over a non-empty string s
, which calculates the frequency of the smallest character in s
. For example, if s = "dcce"
then f(s) = 2
because the smallest character is "c"
and its frequency is 2.
+
+Now, given string arrays queries
and words
, return an integer array answer
, where each answer[i]
is the number of words such that f(queries[i])
< f(W)
, where W
is a word in words
.
+
+
+Example 1:
+
+
+Input: queries = ["cbd"], words = ["zaaaz"]
+Output: [1]
+Explanation: On the first query we have f("cbd") = 1, f("zaaaz") = 3 so f("cbd") < f("zaaaz").
+
+
+Example 2:
+
+
+Input: queries = ["bbb","cc"], words = ["a","aa","aaa","aaaa"]
+Output: [1,2]
+Explanation: On the first query only f("bbb") < f("aaaa"). On the second query both f("aaa") and f("aaaa") are both > f("cc").
+
+
+
+Constraints:
+
+
+ 1 <= queries.length <= 2000
+ 1 <= words.length <= 2000
+ 1 <= queries[i].length, words[i].length <= 10
+ queries[i][j]
, words[i][j]
are English lowercase letters.
+
+
+### 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
+For each string from words calculate the leading count and store it in an array, then sort the integer array.
+
+
+
+Hint 2
+For each string from queries calculate the leading count "p" and in base of the sorted array calculated on the step 1 do a binary search to count the number of items greater than "p".
+
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 e9e43f0a0..7e011589c 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
- [[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)]
+ [[Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list/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
new file mode 100644
index 000000000..237a41434
--- /dev/null
+++ b/problems/design-file-system/README.md
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/single-row-keyboard "Single-Row Keyboard")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-cost-to-connect-sticks "Minimum Cost to Connect Sticks")
+
+## 1166. Design File System (Medium)
+
+
+
+### 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)]
+
+### Hints
+
+Hint 1
+What if you think of a tree hierarchy for the files?.
+
+
+
+Hint 2
+A path is a node in the tree.
+
+
+
+Hint 3
+Use a hash table to store the valid paths along with their values.
+
diff --git a/problems/dinner-plate-stacks/README.md b/problems/dinner-plate-stacks/README.md
new file mode 100644
index 000000000..7d406d328
--- /dev/null
+++ b/problems/dinner-plate-stacks/README.md
@@ -0,0 +1,91 @@
+
+
+
+
+
+
+
+[< 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 >
+
+## 1172. Dinner Plate Stacks (Hard)
+
+You have an infinite number of stacks arranged in a row and numbered (left to right) from 0, each of the stacks has the same maximum capacity
.
+
+Implement the DinnerPlates
class:
+
+
+ DinnerPlates(int capacity)
Initializes the object with the maximum capacity
of the stacks.
+ void push(int val)
pushes the given positive integer val
into the leftmost stack with size less than capacity
.
+ int pop()
returns the value at the top of the rightmost non-empty stack and removes it from that stack, and returns -1
if all stacks are empty.
+ int popAtStack(int index)
returns the value at the top of the stack with the given index
and removes it from that stack, and returns -1 if the stack with that given index
is empty.
+
+
+Example:
+
+
+Input:
+["DinnerPlates","push","push","push","push","push","popAtStack","push","push","popAtStack","popAtStack","pop","pop","pop","pop","pop"]
+[[2],[1],[2],[3],[4],[5],[0],[20],[21],[0],[2],[],[],[],[],[]]
+Output:
+[null,null,null,null,null,null,2,null,null,20,21,5,4,3,1,-1]
+
+Explanation:
+DinnerPlates D = DinnerPlates(2); // Initialize with capacity = 2
+D.push(1);
+D.push(2);
+D.push(3);
+D.push(4);
+D.push(5); // The stacks are now: 2 4
+ 1 3 5
+ ﹈ ﹈ ﹈
+D.popAtStack(0); // Returns 2. The stacks are now: 4
+ 1 3 5
+ ﹈ ﹈ ﹈
+D.push(20); // The stacks are now: 20 4
+ 1 3 5
+ ﹈ ﹈ ﹈
+D.push(21); // The stacks are now: 20 4 21
+ 1 3 5
+ ﹈ ﹈ ﹈
+D.popAtStack(0); // Returns 20. The stacks are now: 4 21
+ 1 3 5
+ ﹈ ﹈ ﹈
+D.popAtStack(2); // Returns 21. The stacks are now: 4
+ 1 3 5
+ ﹈ ﹈ ﹈
+D.pop() // Returns 5. The stacks are now: 4
+ 1 3
+ ﹈ ﹈
+D.pop() // Returns 4. The stacks are now: 1 3
+ ﹈ ﹈
+D.pop() // Returns 3. The stacks are now: 1
+ ﹈
+D.pop() // Returns 1. There are no stacks.
+D.pop() // Returns -1. There are still no stacks.
+
+
+
+Constraints:
+
+
+ 1 <= capacity <= 20000
+ 1 <= val <= 20000
+ 0 <= index <= 100000
+ - At most
200000
calls will be made to push
, pop
, and popAtStack
.
+
+
+### Related Topics
+ [[Design](https://github.com/openset/leetcode/tree/master/tag/design/README.md)]
+
+### Hints
+
+Hint 1
+Use a data structure to save the plate status. You may need to operate the exact index. Maintain the leftmost vacant stack and the rightmost non-empty stack.
+
+
+
+Hint 2
+Use a list of stack to store the plate status. Use heap to maintain the leftmost and rightmost valid stack.
+
diff --git a/problems/invalid-transactions/README.md b/problems/invalid-transactions/README.md
new file mode 100644
index 000000000..05466d1d2
--- /dev/null
+++ b/problems/invalid-transactions/README.md
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/optimize-water-distribution-in-a-village "Optimize Water Distribution in a Village")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/compare-strings-by-frequency-of-the-smallest-character "Compare Strings by Frequency of the Smallest Character")
+
+## 1169. Invalid Transactions (Easy)
+
+A transaction is possibly invalid if:
+
+
+ - the amount exceeds $1000, or;
+ - if it occurs within (and including) 60 minutes of another transaction with the same name in a different city.
+
+
+Each transaction string transactions[i]
consists of comma separated values representing the name, time (in minutes), amount, and city of the transaction.
+
+Given a list of transactions
, return a list of transactions that are possibly invalid. You may return the answer in any order.
+
+
+Example 1:
+
+
+Input: transactions = ["alice,20,800,mtv","alice,50,100,beijing"]
+Output: ["alice,20,800,mtv","alice,50,100,beijing"]
+Explanation: The first transaction is invalid because the second transaction occurs within a difference of 60 minutes, have the same name and is in a different city. Similarly the second one is invalid too.
+
+Example 2:
+
+
+Input: transactions = ["alice,20,800,mtv","alice,50,1200,mtv"]
+Output: ["alice,50,1200,mtv"]
+
+
+Example 3:
+
+
+Input: transactions = ["alice,20,800,mtv","bob,50,1200,mtv"]
+Output: ["bob,50,1200,mtv"]
+
+
+
+Constraints:
+
+
+ transactions.length <= 1000
+ - Each
transactions[i]
takes the form "{name},{time},{amount},{city}"
+ - Each
{name}
and {city}
consist of lowercase English letters, and have lengths between 1
and 10
.
+ - Each
{time}
consist of digits, and represent an integer between 0
and 1000
.
+ - Each
{amount}
consist of digits, and represent an integer between 0
and 2000
.
+
+
+### 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
+Split each string into four arrays.
+
+
+
+Hint 2
+For each transaction check if it's invalid, you can do this with just a loop with help of the four arrays generated on step 1.
+
+
+
+Hint 3
+At the end you perform O(N ^ 2) operations.
+
diff --git a/problems/last-substring-in-lexicographical-order/README.md b/problems/last-substring-in-lexicographical-order/README.md
index 0e01a431c..8affefe7a 100644
--- a/problems/last-substring-in-lexicographical-order/README.md
+++ b/problems/last-substring-in-lexicographical-order/README.md
@@ -7,7 +7,7 @@
[< Previous](https://github.com/openset/leetcode/tree/master/problems/as-far-from-land-as-possible "As Far from Land as Possible")
-Next >
+[Next >](https://github.com/openset/leetcode/tree/master/problems/product-price-at-a-given-date "Product Price at a Given Date")
## 1163. Last Substring in Lexicographical Order (Hard)
diff --git a/problems/longest-consecutive-sequence/README.md b/problems/longest-consecutive-sequence/README.md
index 257addc45..43b0bd141 100644
--- a/problems/longest-consecutive-sequence/README.md
+++ b/problems/longest-consecutive-sequence/README.md
@@ -24,8 +24,8 @@
### Related Topics
- [[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)]
+ [[Array](https://github.com/openset/leetcode/tree/master/tag/array/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/majority-element/README.md b/problems/majority-element/README.md
index 8f50acbf8..f274178fa 100644
--- a/problems/majority-element/README.md
+++ b/problems/majority-element/README.md
@@ -29,9 +29,9 @@
### Related Topics
- [[Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)]
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
[[Divide and Conquer](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md)]
+ [[Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)]
### Similar Questions
1. [Majority Element II](https://github.com/openset/leetcode/tree/master/problems/majority-element-ii) (Medium)
diff --git a/problems/minimum-cost-to-connect-sticks/README.md b/problems/minimum-cost-to-connect-sticks/README.md
new file mode 100644
index 000000000..11ecde0f8
--- /dev/null
+++ b/problems/minimum-cost-to-connect-sticks/README.md
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/design-file-system "Design File System")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/optimize-water-distribution-in-a-village "Optimize Water Distribution in a Village")
+
+## 1167. Minimum Cost to Connect Sticks (Medium)
+
+
+
+### Related Topics
+ [[Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)]
+
+### Similar Questions
+ 1. [Minimum Cost to Merge Stones](https://github.com/openset/leetcode/tree/master/problems/minimum-cost-to-merge-stones) (Hard)
+
+### Hints
+
+Hint 1
+How many times does every stick contribute to the answer?
+
+
+
+Hint 2
+Some of the sticks will be used more than the others. Which sticks should be used the most/least?
+
+
+
+Hint 3
+The sticks with long lengths cost a lot so we should use these the least.
+
+
+
+Hint 4
+What if we keep merging the two shortest sticks?
+
diff --git a/problems/minimum-cost-to-merge-stones/README.md b/problems/minimum-cost-to-merge-stones/README.md
index 5104ecfc4..f22959e97 100644
--- a/problems/minimum-cost-to-merge-stones/README.md
+++ b/problems/minimum-cost-to-merge-stones/README.md
@@ -73,3 +73,4 @@ The total cost was 25, and this is the minimum possible.
### Similar Questions
1. [Burst Balloons](https://github.com/openset/leetcode/tree/master/problems/burst-balloons) (Hard)
+ 1. [Minimum Cost to Connect Sticks](https://github.com/openset/leetcode/tree/master/problems/minimum-cost-to-connect-sticks) (Medium)
diff --git a/problems/optimize-water-distribution-in-a-village/README.md b/problems/optimize-water-distribution-in-a-village/README.md
new file mode 100644
index 000000000..253797488
--- /dev/null
+++ b/problems/optimize-water-distribution-in-a-village/README.md
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/minimum-cost-to-connect-sticks "Minimum Cost to Connect Sticks")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/invalid-transactions "Invalid Transactions")
+
+## 1168. Optimize Water Distribution in a Village (Hard)
+
+
+
+### Related Topics
+ [[Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md)]
+ [[Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)]
+
+### Hints
+
+Hint 1
+What if we model this problem as a graph problem?
+
+
+
+Hint 2
+A house is a node and a pipe is a weighted edge.
+
+
+
+Hint 3
+How to represent building wells in the graph model?
+
+
+
+Hint 4
+Add a virtual node, connect it to houses with edges weighted by the costs to build wells in these houses.
+
+
+
+Hint 5
+The problem is now reduced to a Minimum Spanning Tree problem.
+
diff --git a/problems/product-price-at-a-given-date/README.md b/problems/product-price-at-a-given-date/README.md
new file mode 100644
index 000000000..ca71e506b
--- /dev/null
+++ b/problems/product-price-at-a-given-date/README.md
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/last-substring-in-lexicographical-order "Last Substring in Lexicographical Order")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/single-row-keyboard "Single-Row Keyboard")
+
+## 1164. Product Price at a Given Date (Medium)
+
+
diff --git a/problems/product-price-at-a-given-date/mysql_schemas.sql b/problems/product-price-at-a-given-date/mysql_schemas.sql
new file mode 100644
index 000000000..65061d821
--- /dev/null
+++ b/problems/product-price-at-a-given-date/mysql_schemas.sql
@@ -0,0 +1,8 @@
+Create table If Not Exists Products (product_id int, new_price int, change_date date);
+Truncate table Products;
+insert into Products (product_id, new_price, change_date) values ('1', '20', '2019-08-14');
+insert into Products (product_id, new_price, change_date) values ('2', '50', '2019-08-14');
+insert into Products (product_id, new_price, change_date) values ('1', '30', '2019-08-15');
+insert into Products (product_id, new_price, change_date) values ('1', '35', '2019-08-16');
+insert into Products (product_id, new_price, change_date) values ('2', '65', '2019-08-17');
+insert into Products (product_id, new_price, change_date) values ('3', '20', '2019-08-18');
diff --git a/problems/remove-duplicate-letters/README.md b/problems/remove-duplicate-letters/README.md
index dcd76e034..53dd044ba 100644
--- a/problems/remove-duplicate-letters/README.md
+++ b/problems/remove-duplicate-letters/README.md
@@ -11,7 +11,7 @@
## 316. Remove Duplicate Letters (Hard)
-Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical order among all possible results.
+Given a string which contains only lowercase letters, remove duplicate letters so that every letter appears once and only once. You must make sure your result is the smallest in lexicographical order among all possible results.
Example 1:
diff --git a/problems/remove-zero-sum-consecutive-nodes-from-linked-list/README.md b/problems/remove-zero-sum-consecutive-nodes-from-linked-list/README.md
new file mode 100644
index 000000000..9c29b222e
--- /dev/null
+++ b/problems/remove-zero-sum-consecutive-nodes-from-linked-list/README.md
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/compare-strings-by-frequency-of-the-smallest-character "Compare Strings by Frequency of the Smallest Character")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/dinner-plate-stacks "Dinner Plate Stacks")
+
+## 1171. Remove Zero Sum Consecutive Nodes from Linked List (Medium)
+
+Given the head
of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0
until there are no such sequences.
+
+After doing so, return the head of the final linked list. You may return any such answer.
+
+
+(Note that in the examples below, all sequences are serializations of ListNode
objects.)
+
+Example 1:
+
+
+Input: head = [1,2,-3,3,1]
+Output: [3,1]
+Note: The answer [1,2,1] would also be accepted.
+
+
+Example 2:
+
+
+Input: head = [1,2,3,-3,4]
+Output: [1,2,4]
+
+
+Example 3:
+
+
+Input: head = [1,2,3,-3,-2]
+Output: [1]
+
+
+
+Constraints:
+
+
+ - The given linked list will contain between
1
and 1000
nodes.
+ - Each node in the linked list has
-1000 <= node.val <= 1000
.
+
+
+### Related Topics
+ [[Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md)]
+
+### Hints
+
+Hint 1
+Convert the linked list into an array.
+
+
+
+Hint 2
+While you can find a non-empty subarray with sum = 0, erase it.
+
+
+
+Hint 3
+Convert the array into a linked list.
+
diff --git a/problems/single-row-keyboard/README.md b/problems/single-row-keyboard/README.md
new file mode 100644
index 000000000..c99444159
--- /dev/null
+++ b/problems/single-row-keyboard/README.md
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/product-price-at-a-given-date "Product Price at a Given Date")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/design-file-system "Design File System")
+
+## 1165. Single-Row Keyboard (Easy)
+
+
+
+### Related Topics
+ [[String](https://github.com/openset/leetcode/tree/master/tag/string/README.md)]
+
+### Hints
+
+Hint 1
+Can be the problem divided in parts, so solving each part and sum their solutions it should return the answer? Yes, you only need to divide the problem in finger jumps.
+
+
+
+Hint 2
+In each finger jump you need to move your finger from one character to another, you need to know its index.
+
+
+
+Hint 3
+Map each character to it's index.
+
+
+
+Hint 4
+Use a hash table to do that.
+
diff --git a/problems/word-ladder-ii/README.md b/problems/word-ladder-ii/README.md
index 4335d1576..445628286 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 862a51ec2..a033d3739 100644
--- a/tag/README.md
+++ b/tag/README.md
@@ -16,8 +16,8 @@
| 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 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | [排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) |
-| 17 | [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) | | 18 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | [图](https://github.com/openset/leetcode/tree/master/tag/graph/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) |
| 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) |
| 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) |
@@ -28,4 +28,4 @@
| 33 | [Geometry](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md) | [几何](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md) | | 34 | [Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md) | [Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md) |
| 35 | [Rejection Sampling](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling/README.md) | [Rejection Sampling](https://github.com/openset/leetcode/tree/master/tag/rejection-sampling/README.md) | | 36 | [Reservoir Sampling](https://github.com/openset/leetcode/tree/master/tag/reservoir-sampling/README.md) | [蓄水池抽样](https://github.com/openset/leetcode/tree/master/tag/reservoir-sampling/README.md) |
| 37 | [Binary Search Tree](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree/README.md) | [二叉搜索树](https://github.com/openset/leetcode/tree/master/tag/binary-search-tree/README.md) | | 38 | [Memoization](https://github.com/openset/leetcode/tree/master/tag/memoization/README.md) | [记忆化](https://github.com/openset/leetcode/tree/master/tag/memoization/README.md) |
-| 39 | [Rolling Hash](https://github.com/openset/leetcode/tree/master/tag/rolling-hash/README.md) | [Rolling Hash](https://github.com/openset/leetcode/tree/master/tag/rolling-hash/README.md) |
\ No newline at end of file
+| 39 | [Rolling Hash](https://github.com/openset/leetcode/tree/master/tag/rolling-hash/README.md) | [Rolling Hash](https://github.com/openset/leetcode/tree/master/tag/rolling-hash/README.md) | | 40 | [](https://github.com/openset/leetcode/tree/master/tag/suffix-array/README.md) | [](https://github.com/openset/leetcode/tree/master/tag/suffix-array/README.md) |
diff --git a/tag/array/README.md b/tag/array/README.md
index ffb900671..d06498ed1 100644
--- a/tag/array/README.md
+++ b/tag/array/README.md
@@ -9,6 +9,10 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 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 |
+| 1150 | [检查一个数是否在数组中占绝大多数](https://github.com/openset/leetcode/tree/master/problems/check-if-a-number-is-majority-element-in-a-sorted-array) 🔒 | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy |
| 1146 | [快照数组](https://github.com/openset/leetcode/tree/master/problems/snapshot-array) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] | Medium |
| 1144 | [递减元素使数组呈锯齿状](https://github.com/openset/leetcode/tree/master/problems/decrease-elements-to-make-array-zigzag) | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/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/binary-search/README.md b/tag/binary-search/README.md
index c64fc6d23..b5b3dc09f 100644
--- a/tag/binary-search/README.md
+++ b/tag/binary-search/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 1150 | [检查一个数是否在数组中占绝大多数](https://github.com/openset/leetcode/tree/master/problems/check-if-a-number-is-majority-element-in-a-sorted-array) 🔒 | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy |
| 1095 | [山脉数组中查找目标值](https://github.com/openset/leetcode/tree/master/problems/find-in-mountain-array) | [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Hard |
| 1064 | [不动点](https://github.com/openset/leetcode/tree/master/problems/fixed-point) 🔒 | [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy |
| 1060 | [有序数组中的缺失元素](https://github.com/openset/leetcode/tree/master/problems/missing-element-in-sorted-array) 🔒 | [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Medium |
diff --git a/tag/breadth-first-search/README.md b/tag/breadth-first-search/README.md
index c69462b80..ed2ebba93 100644
--- a/tag/breadth-first-search/README.md
+++ b/tag/breadth-first-search/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 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 |
| 1091 | [二进制矩阵中的最短路径](https://github.com/openset/leetcode/tree/master/problems/shortest-path-in-binary-matrix) | [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Medium |
| 1036 | [逃离大迷宫](https://github.com/openset/leetcode/tree/master/problems/escape-a-large-maze) | [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Hard |
| 994 | [腐烂的橘子](https://github.com/openset/leetcode/tree/master/problems/rotting-oranges) | [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Easy |
diff --git a/tag/graph/README.md b/tag/graph/README.md
index 7abc52130..f0a05a0eb 100644
--- a/tag/graph/README.md
+++ b/tag/graph/README.md
@@ -9,6 +9,9 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 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 |
| 1136 | [平行课程](https://github.com/openset/leetcode/tree/master/problems/parallel-courses) 🔒 | [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[图](https://github.com/openset/leetcode/tree/master/tag/graph/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/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 |
diff --git a/tag/hash-table/README.md b/tag/hash-table/README.md
index a9dc90fa4..f8e99bf4a 100644
--- a/tag/hash-table/README.md
+++ b/tag/hash-table/README.md
@@ -9,6 +9,8 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 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 |
| 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 |
| 1086 | [前五科的均分](https://github.com/openset/leetcode/tree/master/problems/high-five) 🔒 | [[排序](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)] | Easy |
diff --git a/tag/sliding-window/README.md b/tag/sliding-window/README.md
index dcb70c4ad..e8bbc85ed 100644
--- a/tag/sliding-window/README.md
+++ b/tag/sliding-window/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 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 |
| 1052 | [爱生气的书店老板](https://github.com/openset/leetcode/tree/master/problems/grumpy-bookstore-owner) | [[数组](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/sort/README.md b/tag/sort/README.md
index f3bd0a326..49b31ec6f 100644
--- a/tag/sort/README.md
+++ b/tag/sort/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 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 |
| 1122 | [数组的相对排序](https://github.com/openset/leetcode/tree/master/problems/relative-sort-array) | [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)] [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] | Easy |
| 1086 | [前五科的均分](https://github.com/openset/leetcode/tree/master/problems/high-five) 🔒 | [[排序](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)] | Easy |
| 1057 | [校园自行车分配](https://github.com/openset/leetcode/tree/master/problems/campus-bikes) 🔒 | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)] | Medium |
diff --git a/tag/string/README.md b/tag/string/README.md
index b7ec98d94..9ed6defb5 100644
--- a/tag/string/README.md
+++ b/tag/string/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 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 |
| 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 |
diff --git a/tag/suffix-array/README.md b/tag/suffix-array/README.md
new file mode 100644
index 000000000..800064441
--- /dev/null
+++ b/tag/suffix-array/README.md
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+## [话题分类](https://github.com/openset/leetcode/blob/master/tag/README.md) >
+
+| # | 题名 | 标签 | 难度 |
+| :-: | - | - | :-: |
diff --git a/tag/tags.json b/tag/tags.json
index 66241f62f..b80e11c49 100644
--- a/tag/tags.json
+++ b/tag/tags.json
@@ -74,6 +74,11 @@
"Slug": "linked-list",
"TranslatedName": "链表"
},
+ {
+ "Name": "Graph",
+ "Slug": "graph",
+ "TranslatedName": "图"
+ },
{
"Name": "Sort",
"Slug": "sort",
@@ -84,11 +89,6 @@
"Slug": "bit-manipulation",
"TranslatedName": "位运算"
},
- {
- "Name": "Graph",
- "Slug": "graph",
- "TranslatedName": "图"
- },
{
"Name": "Heap",
"Slug": "heap",
@@ -193,5 +193,10 @@
"Name": "Rolling Hash",
"Slug": "rolling-hash",
"TranslatedName": "Rolling Hash"
+ },
+ {
+ "Name": "",
+ "Slug": "suffix-array",
+ "TranslatedName": ""
}
]
\ No newline at end of file