diff --git a/README.md b/README.md
index 964f7997c..dc2b63b94 100644
--- a/README.md
+++ b/README.md
@@ -62,6 +62,10 @@ LeetCode Problems' Solutions
| # | Title | Solution | Difficulty |
| :-: | - | - | :-: |
+| 1240 | [Tiling a Rectangle with the Fewest Squares](https://leetcode.com/problems/tiling-a-rectangle-with-the-fewest-squares "铺瓷砖") | [Go](https://github.com/openset/leetcode/tree/master/problems/tiling-a-rectangle-with-the-fewest-squares) | Hard |
+| 1239 | [Maximum Length of a Concatenated String with Unique Characters](https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters "串联字符串的最大长度") | [Go](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-a-concatenated-string-with-unique-characters) | Medium |
+| 1238 | [Circular Permutation in Binary Representation](https://leetcode.com/problems/circular-permutation-in-binary-representation "循环码排列") | [Go](https://github.com/openset/leetcode/tree/master/problems/circular-permutation-in-binary-representation) | Medium |
+| 1237 | [Find Positive Integer Solution for a Given Equation](https://leetcode.com/problems/find-positive-integer-solution-for-a-given-equation "找出给定方程的正整数解") | [Go](https://github.com/openset/leetcode/tree/master/problems/find-positive-integer-solution-for-a-given-equation) | Easy |
| 1236 | [Web Crawler](https://leetcode.com/problems/web-crawler) 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/web-crawler) | Medium |
| 1235 | [Maximum Profit in Job Scheduling](https://leetcode.com/problems/maximum-profit-in-job-scheduling "规划兼职工作") | [Go](https://github.com/openset/leetcode/tree/master/problems/maximum-profit-in-job-scheduling) | Hard |
| 1234 | [Replace the Substring for Balanced String](https://leetcode.com/problems/replace-the-substring-for-balanced-string "替换子串得到平衡字符串") | [Go](https://github.com/openset/leetcode/tree/master/problems/replace-the-substring-for-balanced-string) | Medium |
@@ -71,9 +75,9 @@ LeetCode Problems' Solutions
| 1230 | [Toss Strange Coins](https://leetcode.com/problems/toss-strange-coins "抛掷硬币") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/toss-strange-coins) | Medium |
| 1229 | [Meeting Scheduler](https://leetcode.com/problems/meeting-scheduler "安排会议日程") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/meeting-scheduler) | Medium |
| 1228 | [Missing Number In Arithmetic Progression](https://leetcode.com/problems/missing-number-in-arithmetic-progression "等差数列中缺失的数字") 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/missing-number-in-arithmetic-progression) | Easy |
-| 1227 | [Airplane Seat Assignment Probability](https://leetcode.com/problems/airplane-seat-assignment-probability) | [Go](https://github.com/openset/leetcode/tree/master/problems/airplane-seat-assignment-probability) | Medium |
-| 1226 | [The Dining Philosophers](https://leetcode.com/problems/the-dining-philosophers) | [Go](https://github.com/openset/leetcode/tree/master/problems/the-dining-philosophers) | Medium |
-| 1225 | [Report Contiguous Dates](https://leetcode.com/problems/report-contiguous-dates) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/report-contiguous-dates) | Hard |
+| 1227 | [Airplane Seat Assignment Probability](https://leetcode.com/problems/airplane-seat-assignment-probability "飞机座位分配概率") | [Go](https://github.com/openset/leetcode/tree/master/problems/airplane-seat-assignment-probability) | Medium |
+| 1226 | [The Dining Philosophers](https://leetcode.com/problems/the-dining-philosophers "哲学家进餐") | [Go](https://github.com/openset/leetcode/tree/master/problems/the-dining-philosophers) | Medium |
+| 1225 | [Report Contiguous Dates](https://leetcode.com/problems/report-contiguous-dates "报告系统状态的连续日期") 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/report-contiguous-dates) | Hard |
| 1224 | [Maximum Equal Frequency](https://leetcode.com/problems/maximum-equal-frequency "最大相等频率") | [Go](https://github.com/openset/leetcode/tree/master/problems/maximum-equal-frequency) | Hard |
| 1223 | [Dice Roll Simulation](https://leetcode.com/problems/dice-roll-simulation "掷骰子模拟") | [Go](https://github.com/openset/leetcode/tree/master/problems/dice-roll-simulation) | Medium |
| 1222 | [Queens That Can Attack the King](https://leetcode.com/problems/queens-that-can-attack-the-king "可以攻击国王的皇后") | [Go](https://github.com/openset/leetcode/tree/master/problems/queens-that-can-attack-the-king) | Medium |
diff --git a/problems/airplane-seat-assignment-probability/README.md b/problems/airplane-seat-assignment-probability/README.md
index 147a55c71..a60966ce1 100644
--- a/problems/airplane-seat-assignment-probability/README.md
+++ b/problems/airplane-seat-assignment-probability/README.md
@@ -9,7 +9,7 @@
[Next >](https://github.com/openset/leetcode/tree/master/problems/missing-number-in-arithmetic-progression "Missing Number In Arithmetic Progression")
-## [1227. Airplane Seat Assignment Probability (Medium)](https://leetcode.com/problems/airplane-seat-assignment-probability "")
+## [1227. Airplane Seat Assignment Probability (Medium)](https://leetcode.com/problems/airplane-seat-assignment-probability "飞机座位分配概率")
diff --git a/problems/circular-permutation-in-binary-representation/README.md b/problems/circular-permutation-in-binary-representation/README.md
new file mode 100644
index 000000000..69ea0a51d
--- /dev/null
+++ b/problems/circular-permutation-in-binary-representation/README.md
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/find-positive-integer-solution-for-a-given-equation "Find Positive Integer Solution for a Given Equation")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-a-concatenated-string-with-unique-characters "Maximum Length of a Concatenated String with Unique Characters")
+
+## [1238. Circular Permutation in Binary Representation (Medium)](https://leetcode.com/problems/circular-permutation-in-binary-representation "循环码排列")
+
+Given 2 integers n
and start
. Your task is return any permutation p
of (0,1,2.....,2^n -1)
such that :
+
+
+ p[0] = start
+ p[i]
and p[i+1]
differ by only one bit in their binary representation.
+ p[0]
and p[2^n -1]
must also differ by only one bit in their binary representation.
+
+
+
+Example 1:
+
+
+Input: n = 2, start = 3
+Output: [3,2,0,1]
+Explanation: The binary representation of the permutation is (11,10,00,01).
+All the adjacent element differ by one bit. Another valid permutation is [3,1,0,2]
+
+
+Example 2:
+
+
+Input: n = 3, start = 2
+Output: [2,6,7,5,4,0,1,3]
+Explanation: The binary representation of the permutation is (010,110,111,101,100,000,001,011).
+
+
+
+Constraints:
+
+
+ 1 <= n <= 16
+ 0 <= start < 2 ^ n
+
+
+### Related Topics
+ [[Math](https://github.com/openset/leetcode/tree/master/tag/math/README.md)]
+
+### Hints
+
+Hint 1
+Use gray code to generate a n-bit sequence.
+
+
+
+Hint 2
+Rotate the sequence such that its first element is start.
+
diff --git a/problems/duplicate-zeros/README.md b/problems/duplicate-zeros/README.md
index ed16b029d..9856d288b 100644
--- a/problems/duplicate-zeros/README.md
+++ b/problems/duplicate-zeros/README.md
@@ -50,5 +50,20 @@
### Hints
Hint 1
-Iterate through the array backwards. You know whether an integer should be written or not based on how many zeroes are remaining in the array.
+This is a great introductory problem for understanding and working with the concept of in-place operations. The problem statement clearly states that we are to modify the array in-place. That does not mean we cannot use another array. We just don't have to return anything.
+
+
+
+Hint 2
+A better way to solve this would be without using additional space. The only reason the problem statement allows you to make modifications in place is that it hints at avoiding any additional memory.
+
+
+
+Hint 3
+The main problem with not using additional memory is that we might override elements due to the zero duplication requirement of the problem statement. How do we get around that?
+
+
+
+Hint 4
+If we had enough space available, we would be able to accommodate all the elements properly. The new length would be the original length of the array plus the number of zeros. Can we use this information somehow to solve the problem?
diff --git a/problems/find-all-numbers-disappeared-in-an-array/README.md b/problems/find-all-numbers-disappeared-in-an-array/README.md
index 5e2363f9f..fc993b326 100644
--- a/problems/find-all-numbers-disappeared-in-an-array/README.md
+++ b/problems/find-all-numbers-disappeared-in-an-array/README.md
@@ -33,3 +33,19 @@
### Similar Questions
1. [First Missing Positive](https://github.com/openset/leetcode/tree/master/problems/first-missing-positive) (Hard)
1. [Find All Duplicates in an Array](https://github.com/openset/leetcode/tree/master/problems/find-all-duplicates-in-an-array) (Medium)
+
+### Hints
+
+Hint 1
+This is a really easy problem if you decide to use additional memory. For those trying to write an initial solution using additional memory, think counters!
+
+
+
+Hint 2
+However, the trick really is to not use any additional space than what is already available to use. Sometimes, multiple passes over the input array help find the solution. However, there's an interesting piece of information in this problem that makes it easy to re-use the input array itself for the solution.
+
+
+
+Hint 3
+The problem specifies that the numbers in the array will be in the range [1, n] where n is the number of elements in the array. Can we use this information and modify the array in-place somehow to find what we need?
+
diff --git a/problems/find-positive-integer-solution-for-a-given-equation/README.md b/problems/find-positive-integer-solution-for-a-given-equation/README.md
new file mode 100644
index 000000000..5301d7de2
--- /dev/null
+++ b/problems/find-positive-integer-solution-for-a-given-equation/README.md
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/web-crawler "Web Crawler")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/circular-permutation-in-binary-representation "Circular Permutation in Binary Representation")
+
+## [1237. Find Positive Integer Solution for a Given Equation (Easy)](https://leetcode.com/problems/find-positive-integer-solution-for-a-given-equation "找出给定方程的正整数解")
+
+Given a function f(x, y)
and a value z
, return all positive integer pairs x
and y
where f(x,y) == z
.
+
+The function is constantly increasing, i.e.:
+
+
+ f(x, y) < f(x + 1, y)
+ f(x, y) < f(x, y + 1)
+
+
+The function interface is defined like this:
+
+
+interface CustomFunction {
+public:
+ // Returns positive integer f(x, y) for any given positive integer x and y.
+ int f(int x, int y);
+};
+
+
+For custom testing purposes you're given an integer function_id
and a target z
as input, where function_id
represent one function from an secret internal list, on the examples you'll know only two functions from the list.
+
+You may return the solutions in any order.
+
+
+Example 1:
+
+
+Input: function_id = 1, z = 5
+Output: [[1,4],[2,3],[3,2],[4,1]]
+Explanation: function_id = 1 means that f(x, y) = x + y
+
+Example 2:
+
+
+Input: function_id = 2, z = 5
+Output: [[1,5],[5,1]]
+Explanation: function_id = 2 means that f(x, y) = x * y
+
+
+
+Constraints:
+
+
+ 1 <= function_id <= 9
+ 1 <= z <= 100
+ - It's guaranteed that the solutions of
f(x, y) == z
will be on the range 1 <= x, y <= 1000
+ - It's also guaranteed that
f(x, y)
will fit in 32 bit signed integer if 1 <= x, y <= 1000
+
+
+### Related Topics
+ [[Math](https://github.com/openset/leetcode/tree/master/tag/math/README.md)]
+ [[Binary Search](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)]
+
+### Hints
+
+Hint 1
+Loop over 1 ≤ x,y ≤ 1000 and check if f(x,y) == z.
+
diff --git a/problems/find-the-celebrity/README.md b/problems/find-the-celebrity/README.md
index a6d9f9e8d..c9207f7f2 100644
--- a/problems/find-the-celebrity/README.md
+++ b/problems/find-the-celebrity/README.md
@@ -18,3 +18,17 @@
### Similar Questions
1. [Find the Town Judge](https://github.com/openset/leetcode/tree/master/problems/find-the-town-judge) (Easy)
+
+### Hints
+
+Hint 1
+The best hint for this problem can be provided by the following figure:
+
+
+
+
+
+
+Hint 2
+Well, if you understood the gist of the above idea, you can extend it to find a candidate that can possibly be a celebrity. Why do we say a "candidate"? That is for you to think. This is clearly a greedy approach to find the answer. However, there is some information that would still remain to be verified without which we can't obtain an answer with certainty. To get that stake in the ground, we would need some more calls to the knows API.
+
diff --git a/problems/max-consecutive-ones-iii/README.md b/problems/max-consecutive-ones-iii/README.md
index fa6c3c4d9..d4661becf 100644
--- a/problems/max-consecutive-ones-iii/README.md
+++ b/problems/max-consecutive-ones-iii/README.md
@@ -59,3 +59,24 @@ Bolded numbers were flipped from 0 to 1. The longest subarray is underlined.
1. [Longest Repeating Character Replacement](https://github.com/openset/leetcode/tree/master/problems/longest-repeating-character-replacement) (Medium)
1. [Max Consecutive Ones](https://github.com/openset/leetcode/tree/master/problems/max-consecutive-ones) (Easy)
1. [Max Consecutive Ones II](https://github.com/openset/leetcode/tree/master/problems/max-consecutive-ones-ii) (Medium)
+
+### Hints
+
+Hint 1
+One thing's for sure, we will only flip a zero if it extends an existing window of 1s. Otherwise, there's no point in doing it, right? Think Sliding Window!
+
+
+
+Hint 2
+Since we know this problem can be solved using the sliding window construct, we might as well focus in that direction for hints. Basically, in a given window, we can never have > K zeros, right?
+
+
+
+Hint 3
+We don't have a fixed size window in this case. The window size can grow and shrink depending upon the number of zeros we have (we don't actually have to flip the zeros here!).
+
+
+
+Hint 4
+The way to shrink or expand a window would be based on the number of zeros that can still be flipped and so on.
+
diff --git a/problems/max-consecutive-ones/README.md b/problems/max-consecutive-ones/README.md
index 2dd125a96..4079de2d3 100644
--- a/problems/max-consecutive-ones/README.md
+++ b/problems/max-consecutive-ones/README.md
@@ -35,3 +35,11 @@
### Similar Questions
1. [Max Consecutive Ones II](https://github.com/openset/leetcode/tree/master/problems/max-consecutive-ones-ii) (Medium)
1. [Max Consecutive Ones III](https://github.com/openset/leetcode/tree/master/problems/max-consecutive-ones-iii) (Medium)
+
+### Hints
+
+Hint 1
+You need to think about two things as far as any window is concerned. One is the starting point for the window. How do you detect that a new window of 1s has started? The next part is detecting the ending point for this window.
+
+How do you detect the ending point for an existing window? If you figure these two things out, you will be able to detect the windows of consecutive ones. All that remains afterward is to find the longest such window and return the size.
+
diff --git a/problems/maximum-length-of-a-concatenated-string-with-unique-characters/README.md b/problems/maximum-length-of-a-concatenated-string-with-unique-characters/README.md
new file mode 100644
index 000000000..309cc81be
--- /dev/null
+++ b/problems/maximum-length-of-a-concatenated-string-with-unique-characters/README.md
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/circular-permutation-in-binary-representation "Circular Permutation in Binary Representation")
+
+[Next >](https://github.com/openset/leetcode/tree/master/problems/tiling-a-rectangle-with-the-fewest-squares "Tiling a Rectangle with the Fewest Squares")
+
+## [1239. Maximum Length of a Concatenated String with Unique Characters (Medium)](https://leetcode.com/problems/maximum-length-of-a-concatenated-string-with-unique-characters "串联字符串的最大长度")
+
+Given an array of strings arr
. String s
is a concatenation of a sub-sequence of arr
which have unique characters.
+
+Return the maximum possible length of s
.
+
+
+Example 1:
+
+
+Input: arr = ["un","iq","ue"]
+Output: 4
+Explanation: All possible concatenations are "","un","iq","ue","uniq" and "ique".
+Maximum length is 4.
+
+
+Example 2:
+
+
+Input: arr = ["cha","r","act","ers"]
+Output: 6
+Explanation: Possible solutions are "chaers" and "acters".
+
+
+Example 3:
+
+
+Input: arr = ["abcdefghijklmnopqrstuvwxyz"]
+Output: 26
+
+
+
+Constraints:
+
+
+ 1 <= arr.length <= 16
+ 1 <= arr[i].length <= 26
+ arr[i]
contains only lower case English letters.
+
+
+### Related Topics
+ [[Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)]
+ [[Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)]
+
+### Hints
+
+Hint 1
+You can try all combinations and keep mask of characters you have.
+
+
+
+Hint 2
+You can use DP.
+
diff --git a/problems/maximum-sum-circular-subarray/README.md b/problems/maximum-sum-circular-subarray/README.md
index 73f9c96e4..e0b7b364d 100644
--- a/problems/maximum-sum-circular-subarray/README.md
+++ b/problems/maximum-sum-circular-subarray/README.md
@@ -78,3 +78,23 @@
### Related Topics
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
+
+### Hints
+
+Hint 1
+For those of you who are familiar with the Kadane's algorithm, think in terms of that. For the newbies, Kadane's algorithm is used to finding the maximum sum subarray from a given array. This problem is a twist on that idea and it is advisable to read up on that algorithm first before starting this problem. Unless you already have a great algorithm brewing up in your mind in which case, go right ahead!
+
+
+
+Hint 2
+What is an alternate way of representing a circular array so that it appears to be a straight array?
+Essentially, there are two cases of this problem that we need to take care of. Let's look at the figure below to understand those two cases:
+
+
+
+
+
+
+Hint 3
+The first case can be handled by the good old Kadane's algorithm. However, is there a smarter way of going about handling the second case as well?
+
diff --git a/problems/move-zeroes/README.md b/problems/move-zeroes/README.md
index d69fb3a9e..f2ea21b89 100644
--- a/problems/move-zeroes/README.md
+++ b/problems/move-zeroes/README.md
@@ -32,3 +32,14 @@
### Similar Questions
1. [Remove Element](https://github.com/openset/leetcode/tree/master/problems/remove-element) (Easy)
+
+### Hints
+
+Hint 1
+In-place means we should not be allocating any space for extra array. But we are allowed to modify the existing array. However, as a first step, try coming up with a solution that makes use of additional space. For this problem as well, first apply the idea discussed using an additional array and the in-place solution will pop up eventually.
+
+
+
+Hint 2
+A two-pointer approach could be helpful here. The idea would be to have one pointer for iterating the array and another pointer that just works on the non-zero elements of the array.
+
diff --git a/problems/report-contiguous-dates/README.md b/problems/report-contiguous-dates/README.md
index 8d3194087..2b96ebd67 100644
--- a/problems/report-contiguous-dates/README.md
+++ b/problems/report-contiguous-dates/README.md
@@ -9,7 +9,7 @@
[Next >](https://github.com/openset/leetcode/tree/master/problems/the-dining-philosophers "The Dining Philosophers")
-## [1225. Report Contiguous Dates (Hard)](https://leetcode.com/problems/report-contiguous-dates "")
+## [1225. Report Contiguous Dates (Hard)](https://leetcode.com/problems/report-contiguous-dates "报告系统状态的连续日期")
Table: Failed
diff --git a/problems/reverse-only-letters/README.md b/problems/reverse-only-letters/README.md
index a44bee935..4fd63bcdb 100644
--- a/problems/reverse-only-letters/README.md
+++ b/problems/reverse-only-letters/README.md
@@ -65,3 +65,9 @@
### Related Topics
[[String](https://github.com/openset/leetcode/tree/master/tag/string/README.md)]
+
+### Hints
+
+Hint 1
+This problem is exactly like reversing a normal string except that there are certain characters that we have to simply skip. That should be easy enough to do if you know how to reverse a string using the two-pointer approach.
+
diff --git a/problems/reverse-string/README.md b/problems/reverse-string/README.md
index 7c5a2ca27..db6b908fb 100644
--- a/problems/reverse-string/README.md
+++ b/problems/reverse-string/README.md
@@ -44,3 +44,9 @@
### Similar Questions
1. [Reverse Vowels of a String](https://github.com/openset/leetcode/tree/master/problems/reverse-vowels-of-a-string) (Easy)
1. [Reverse String II](https://github.com/openset/leetcode/tree/master/problems/reverse-string-ii) (Easy)
+
+### Hints
+
+Hint 1
+The entire logic for reversing a string is based on using the opposite directional two-pointer approach!
+
diff --git a/problems/sliding-window-median/README.md b/problems/sliding-window-median/README.md
index 45164b7fc..b8223a8d9 100644
--- a/problems/sliding-window-median/README.md
+++ b/problems/sliding-window-median/README.md
@@ -42,3 +42,19 @@ You may assume k
is always valid, ie: k
is always smal
### Similar Questions
1. [Find Median from Data Stream](https://github.com/openset/leetcode/tree/master/problems/find-median-from-data-stream) (Hard)
+
+### Hints
+
+Hint 1
+The simplest of solutions comes from the basic idea of finding the median given a set of numbers. We know that by definition, a median is the center element (or an average of the two center elements). Given an unsorted list of numbers, how do we find the median element? If you know the answer to this question, can we extend this idea to every sliding window that we come across in the array?
+
+
+
+Hint 2
+Is there a better way to do what we are doing in the above hint? Don't you think there is duplication of calculation being done there? Is there some sort of optimization that we can do to achieve the same result? This approach is merely a modification of the basic approach except that it simply reduces duplication of calculations once done.
+
+
+
+Hint 3
+The third line of thought is also based on this same idea but achieving the result in a different way. We obviously need the window to be sorted for us to be able to find the median. Is there a data-structure out there that we can use (in one or more quantities) to obtain the median element extremely fast, say O(1) time while having the ability to perform the other operations fairly efficiently as well?
+
diff --git a/problems/sort-an-array/README.md b/problems/sort-an-array/README.md
index 86a14b810..be77076e8 100644
--- a/problems/sort-an-array/README.md
+++ b/problems/sort-an-array/README.md
@@ -14,29 +14,17 @@
Given an array of integers nums
, sort the array in ascending order.
-
-
-
-
Example 1:
-
-
-Input: [5,2,3,1]
+Input: nums = [5,2,3,1]
Output: [1,2,3,5]
+
Example 2:
+Input: nums = [5,1,1,2,0,0]
+Output: [0,0,1,1,2,5]
-
-Example 2:
-
-
-Input: [5,1,1,2,0,0]
-Output: [0,0,1,1,2,5]
-
-
+Constraints:
-Note:
-
-
- 1 <= A.length <= 10000
- -50000 <= A[i] <= 50000
-
+
+ 1 <= nums.length <= 50000
+ -50000 <= nums[i] <= 50000
+
diff --git a/problems/the-dining-philosophers/README.md b/problems/the-dining-philosophers/README.md
index 5e24a6b5a..69093ccf2 100644
--- a/problems/the-dining-philosophers/README.md
+++ b/problems/the-dining-philosophers/README.md
@@ -9,7 +9,7 @@
[Next >](https://github.com/openset/leetcode/tree/master/problems/airplane-seat-assignment-probability "Airplane Seat Assignment Probability")
-## [1226. The Dining Philosophers (Medium)](https://leetcode.com/problems/the-dining-philosophers "")
+## [1226. The Dining Philosophers (Medium)](https://leetcode.com/problems/the-dining-philosophers "哲学家进餐")
Five silent philosophers sit at a round table with bowls of spaghetti. Forks are placed between each pair of adjacent philosophers.
diff --git a/problems/tiling-a-rectangle-with-the-fewest-squares/README.md b/problems/tiling-a-rectangle-with-the-fewest-squares/README.md
new file mode 100644
index 000000000..bfa89d44f
--- /dev/null
+++ b/problems/tiling-a-rectangle-with-the-fewest-squares/README.md
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+[< Previous](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-a-concatenated-string-with-unique-characters "Maximum Length of a Concatenated String with Unique Characters")
+
+Next >
+
+## [1240. Tiling a Rectangle with the Fewest Squares (Hard)](https://leetcode.com/problems/tiling-a-rectangle-with-the-fewest-squares "铺瓷砖")
+
+Given a rectangle of size n
x m
, find the minimum number of integer-sided squares that tile the rectangle.
+
+
+Example 1:
+
+
+
+
+Input: n = 2, m = 3
+Output: 3
+Explanation: 3
squares are necessary to cover the rectangle.
+2
(squares of 1x1
)
+1
(square of 2x2
)
+
+Example 2:
+
+
+
+
+Input: n = 5, m = 8
+Output: 5
+
+
+Example 3:
+
+
+
+
+Input: n = 11, m = 13
+Output: 6
+
+
+
+Constraints:
+
+
+ 1 <= n <= 13
+ 1 <= m <= 13
+
+
+### Related Topics
+ [[Dynamic Programming](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)]
+ [[Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)]
+
+### Hints
+
+Hint 1
+Can you use backtracking to solve this problem ?.
+
+
+
+Hint 2
+Suppose you've placed a bunch of squares. Where is the natural spot to place the next square ?.
+
+
+
+Hint 3
+The maximum number of squares to be placed will be ≤ max(n,m).
+
diff --git a/problems/to-lower-case/README.md b/problems/to-lower-case/README.md
index dd738713c..a3f26d980 100644
--- a/problems/to-lower-case/README.md
+++ b/problems/to-lower-case/README.md
@@ -44,3 +44,19 @@
### Related Topics
[[String](https://github.com/openset/leetcode/tree/master/tag/string/README.md)]
+
+### Hints
+
+Hint 1
+Most languages support lowercase conversion for a string data type. However, that is certainly not the purpose of the problem. Think about how the implementation of the lowercase function call can be done easily.
+
+
+
+Hint 2
+Think ASCII!
+
+
+
+Hint 3
+Think about the different capital letters and their ASCII codes and how that relates to their lowercase counterparts. Does there seem to be any pattern there? Any mathematical relationship that we can use?
+
diff --git a/problems/transpose-matrix/README.md b/problems/transpose-matrix/README.md
index 01c038193..aec274fb9 100644
--- a/problems/transpose-matrix/README.md
+++ b/problems/transpose-matrix/README.md
@@ -15,6 +15,9 @@
The transpose of a matrix is the matrix flipped over it's main diagonal, switching the row and column indices of the matrix.
+
+
+
@@ -46,3 +49,9 @@
### Related Topics
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
+
+### Hints
+
+Hint 1
+We don't need any special algorithms to do this. You just need to know what the transpose of a matrix looks like. Rows become columns and vice versa!
+
diff --git a/problems/two-sum/README.md b/problems/two-sum/README.md
index 398cb1e40..3e2f47d42 100644
--- a/problems/two-sum/README.md
+++ b/problems/two-sum/README.md
@@ -36,3 +36,19 @@ return [
0,
1].
1. [Subarray Sum Equals K](https://github.com/openset/leetcode/tree/master/problems/subarray-sum-equals-k) (Medium)
1. [Two Sum IV - Input is a BST](https://github.com/openset/leetcode/tree/master/problems/two-sum-iv-input-is-a-bst) (Easy)
1. [Two Sum Less Than K](https://github.com/openset/leetcode/tree/master/problems/two-sum-less-than-k) (Easy)
+
+### Hints
+
+Hint 1
+A really brute force way would be to search for all possible pairs of numbers but that would be too slow. Again, it's best to try out brute force solutions for just for completeness. It is from these brute force solutions that you can come up with optimizations.
+
+
+
+Hint 2
+So, if we fix one of the numbers, say x
, we have to scan the entire array to find the next number y
which is value - x
where value is the input parameter. Can we change our array somehow so that this search becomes faster?
+
+
+
+Hint 3
+The second train of thought is, without changing the array, can we use additional space somehow? Like maybe a hash map to speed up the search?
+
diff --git a/problems/valid-mountain-array/README.md b/problems/valid-mountain-array/README.md
index 5c330783c..db0606664 100644
--- a/problems/valid-mountain-array/README.md
+++ b/problems/valid-mountain-array/README.md
@@ -25,6 +25,9 @@
+
+

+
Example 1:
@@ -70,3 +73,9 @@
### Related Topics
[[Array](https://github.com/openset/leetcode/tree/master/tag/array/README.md)]
+
+### Hints
+
+Hint 1
+It's very easy to keep track of a monotonically increasing or decreasing ordering of elements. You just need to be able to determine the start of the valley in the mountain and from that point onwards, it should be a valley i.e. no mini-hills after that. Use this information in regards to the values in the array and you will be able to come up with a straightforward solution.
+
diff --git a/problems/web-crawler/README.md b/problems/web-crawler/README.md
index 810f1c0c2..a1c24ca8e 100644
--- a/problems/web-crawler/README.md
+++ b/problems/web-crawler/README.md
@@ -7,7 +7,7 @@
[< Previous](https://github.com/openset/leetcode/tree/master/problems/maximum-profit-in-job-scheduling "Maximum Profit in Job Scheduling")
-Next >
+[Next >](https://github.com/openset/leetcode/tree/master/problems/find-positive-integer-solution-for-a-given-equation "Find Positive Integer Solution for a Given Equation")
## [1236. Web Crawler (Medium)](https://leetcode.com/problems/web-crawler "")
diff --git a/tag/README.md b/tag/README.md
index de32cf553..75b8adb24 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://openset.github.io/tags/greedy/) | | 10 | [Two Pointers](https://github.com/openset/leetcode/tree/master/tag/two-pointers/README.md) | [双指针](https://openset.github.io/tags/two-pointers/) |
| 11 | [Breadth-first Search](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md) | [广度优先搜索](https://openset.github.io/tags/breadth-first-search/) | | 12 | [Stack](https://github.com/openset/leetcode/tree/master/tag/stack/README.md) | [栈](https://openset.github.io/tags/stack/) |
| 13 | [Backtracking](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md) | [回溯算法](https://openset.github.io/tags/backtracking/) | | 14 | [Design](https://github.com/openset/leetcode/tree/master/tag/design/README.md) | [设计](https://openset.github.io/tags/design/) |
-| 15 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | [排序](https://openset.github.io/tags/sort/) | | 16 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | [图](https://openset.github.io/tags/graph/) |
-| 17 | [Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md) | [链表](https://openset.github.io/tags/linked-list/) | | 18 | [Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md) | [位运算](https://openset.github.io/tags/bit-manipulation/) |
+| 15 | [Sort](https://github.com/openset/leetcode/tree/master/tag/sort/README.md) | [排序](https://openset.github.io/tags/sort/) | | 16 | [Bit Manipulation](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md) | [位运算](https://openset.github.io/tags/bit-manipulation/) |
+| 17 | [Graph](https://github.com/openset/leetcode/tree/master/tag/graph/README.md) | [图](https://openset.github.io/tags/graph/) | | 18 | [Linked List](https://github.com/openset/leetcode/tree/master/tag/linked-list/README.md) | [链表](https://openset.github.io/tags/linked-list/) |
| 19 | [Heap](https://github.com/openset/leetcode/tree/master/tag/heap/README.md) | [堆](https://openset.github.io/tags/heap/) | | 20 | [Union Find](https://github.com/openset/leetcode/tree/master/tag/union-find/README.md) | [并查集](https://openset.github.io/tags/union-find/) |
| 21 | [Sliding Window](https://github.com/openset/leetcode/tree/master/tag/sliding-window/README.md) | [Sliding Window](https://openset.github.io/tags/sliding-window/) | | 22 | [Divide and Conquer](https://github.com/openset/leetcode/tree/master/tag/divide-and-conquer/README.md) | [分治算法](https://openset.github.io/tags/divide-and-conquer/) |
| 23 | [Trie](https://github.com/openset/leetcode/tree/master/tag/trie/README.md) | [字典树](https://openset.github.io/tags/trie/) | | 24 | [Recursion](https://github.com/openset/leetcode/tree/master/tag/recursion/README.md) | [递归](https://openset.github.io/tags/recursion/) |
diff --git a/tag/backtracking/README.md b/tag/backtracking/README.md
index 6595ae7ac..8ab4ec0c1 100644
--- a/tag/backtracking/README.md
+++ b/tag/backtracking/README.md
@@ -9,6 +9,8 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 1240 | [铺瓷砖](https://github.com/openset/leetcode/tree/master/problems/tiling-a-rectangle-with-the-fewest-squares) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Hard |
+| 1239 | [串联字符串的最大长度](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-a-concatenated-string-with-unique-characters) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Medium |
| 1219 | [黄金矿工](https://github.com/openset/leetcode/tree/master/problems/path-with-maximum-gold) | [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Medium |
| 1215 | [步进数](https://github.com/openset/leetcode/tree/master/problems/stepping-numbers) 🔒 | [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Medium |
| 1088 | [易混淆数 II](https://github.com/openset/leetcode/tree/master/problems/confusing-number-ii) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Hard |
diff --git a/tag/binary-search/README.md b/tag/binary-search/README.md
index 1d7b06ddd..376a5d2dd 100644
--- a/tag/binary-search/README.md
+++ b/tag/binary-search/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 1237 | [找出给定方程的正整数解](https://github.com/openset/leetcode/tree/master/problems/find-positive-integer-solution-for-a-given-equation) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy |
| 1235 | [规划兼职工作](https://github.com/openset/leetcode/tree/master/problems/maximum-profit-in-job-scheduling) | [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/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)] | Hard |
| 1231 | [分享巧克力](https://github.com/openset/leetcode/tree/master/problems/divide-chocolate) 🔒 | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Hard |
| 1201 | [丑数 III](https://github.com/openset/leetcode/tree/master/problems/ugly-number-iii) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Medium |
diff --git a/tag/bit-manipulation/README.md b/tag/bit-manipulation/README.md
index 31f102e0d..93b9deec3 100644
--- a/tag/bit-manipulation/README.md
+++ b/tag/bit-manipulation/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 1239 | [串联字符串的最大长度](https://github.com/openset/leetcode/tree/master/problems/maximum-length-of-a-concatenated-string-with-unique-characters) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Medium |
| 1178 | [猜字谜](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 |
| 1131 | [绝对值表达式的最大值](https://github.com/openset/leetcode/tree/master/problems/maximum-of-absolute-value-expression) | [[位运算](https://github.com/openset/leetcode/tree/master/tag/bit-manipulation/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium |
| 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 |
diff --git a/tag/brainteaser/README.md b/tag/brainteaser/README.md
index 5e18982ac..279f180a2 100644
--- a/tag/brainteaser/README.md
+++ b/tag/brainteaser/README.md
@@ -9,6 +9,7 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 1227 | [飞机座位分配概率](https://github.com/openset/leetcode/tree/master/problems/airplane-seat-assignment-probability) | [[脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser/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 |
| 1033 | [移动石子直到连续](https://github.com/openset/leetcode/tree/master/problems/moving-stones-until-consecutive) | [[脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser/README.md)] | Easy |
| 777 | [在LR字符串中交换相邻字符](https://github.com/openset/leetcode/tree/master/problems/swap-adjacent-in-lr-string) | [[脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser/README.md)] | Medium |
| 319 | [灯泡开关](https://github.com/openset/leetcode/tree/master/problems/bulb-switcher) | [[脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium |
diff --git a/tag/dynamic-programming/README.md b/tag/dynamic-programming/README.md
index 8b812f183..d72af00af 100644
--- a/tag/dynamic-programming/README.md
+++ b/tag/dynamic-programming/README.md
@@ -9,8 +9,10 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 1240 | [铺瓷砖](https://github.com/openset/leetcode/tree/master/problems/tiling-a-rectangle-with-the-fewest-squares) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] [[回溯算法](https://github.com/openset/leetcode/tree/master/tag/backtracking/README.md)] | Hard |
| 1235 | [规划兼职工作](https://github.com/openset/leetcode/tree/master/problems/maximum-profit-in-job-scheduling) | [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/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)] | Hard |
| 1230 | [抛掷硬币](https://github.com/openset/leetcode/tree/master/problems/toss-strange-coins) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium |
+| 1227 | [飞机座位分配概率](https://github.com/openset/leetcode/tree/master/problems/airplane-seat-assignment-probability) | [[脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser/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 |
| 1223 | [掷骰子模拟](https://github.com/openset/leetcode/tree/master/problems/dice-roll-simulation) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium |
| 1220 | [统计元音字母序列的数目](https://github.com/openset/leetcode/tree/master/problems/count-vowels-permutation) | [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard |
| 1218 | [最长定差子序列](https://github.com/openset/leetcode/tree/master/problems/longest-arithmetic-subsequence-of-given-difference) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium |
diff --git a/tag/math/README.md b/tag/math/README.md
index 64992d52b..a16e31ff0 100644
--- a/tag/math/README.md
+++ b/tag/math/README.md
@@ -9,9 +9,12 @@
| # | 题名 | 标签 | 难度 |
| :-: | - | - | :-: |
+| 1238 | [循环码排列](https://github.com/openset/leetcode/tree/master/problems/circular-permutation-in-binary-representation) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium |
+| 1237 | [找出给定方程的正整数解](https://github.com/openset/leetcode/tree/master/problems/find-positive-integer-solution-for-a-given-equation) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy |
| 1232 | [缀点成线](https://github.com/openset/leetcode/tree/master/problems/check-if-it-is-a-straight-line) | [[几何](https://github.com/openset/leetcode/tree/master/tag/geometry/README.md)] [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Easy |
| 1230 | [抛掷硬币](https://github.com/openset/leetcode/tree/master/problems/toss-strange-coins) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium |
| 1228 | [等差数列中缺失的数字](https://github.com/openset/leetcode/tree/master/problems/missing-number-in-arithmetic-progression) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Easy |
+| 1227 | [飞机座位分配概率](https://github.com/openset/leetcode/tree/master/problems/airplane-seat-assignment-probability) | [[脑筋急转弯](https://github.com/openset/leetcode/tree/master/tag/brainteaser/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 |
| 1218 | [最长定差子序列](https://github.com/openset/leetcode/tree/master/problems/longest-arithmetic-subsequence-of-given-difference) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Medium |
| 1217 | [玩筹码](https://github.com/openset/leetcode/tree/master/problems/play-with-chips) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数组](https://github.com/openset/leetcode/tree/master/tag/array/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Easy |
| 1201 | [丑数 III](https://github.com/openset/leetcode/tree/master/problems/ugly-number-iii) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Medium |
diff --git a/tag/tags.json b/tag/tags.json
index 143d9c1d1..d039d5799 100644
--- a/tag/tags.json
+++ b/tag/tags.json
@@ -74,6 +74,11 @@
"Slug": "sort",
"TranslatedName": "排序"
},
+ {
+ "Name": "Bit Manipulation",
+ "Slug": "bit-manipulation",
+ "TranslatedName": "位运算"
+ },
{
"Name": "Graph",
"Slug": "graph",
@@ -84,11 +89,6 @@
"Slug": "linked-list",
"TranslatedName": "链表"
},
- {
- "Name": "Bit Manipulation",
- "Slug": "bit-manipulation",
- "TranslatedName": "位运算"
- },
{
"Name": "Heap",
"Slug": "heap",