Skip to content

Commit 62f1dec

Browse files
author
Shuo
committed
A: new
1 parent d96227e commit 62f1dec

File tree

1,787 files changed

+11988
-15819
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,787 files changed

+11988
-15819
lines changed

README.md

Lines changed: 54 additions & 13 deletions
Large diffs are not rendered by default.

problems/01-matrix/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,7 @@
4343
</ul>
4444

4545
### Related Topics
46-
[[Depth-first Search](../../tag/depth-first-search/README.md)]
47-
[[Breadth-first Search](../../tag/breadth-first-search/README.md)]
46+
[[Breadth-First Search](../../tag/breadth-first-search/README.md)]
47+
[[Array](../../tag/array/README.md)]
48+
[[Dynamic Programming](../../tag/dynamic-programming/README.md)]
49+
[[Matrix](../../tag/matrix/README.md)]

problems/132-pattern/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@
5151

5252
### Related Topics
5353
[[Stack](../../tag/stack/README.md)]
54+
[[Array](../../tag/array/README.md)]
55+
[[Binary Search](../../tag/binary-search/README.md)]
56+
[[Ordered Set](../../tag/ordered-set/README.md)]
57+
[[Monotonic Stack](../../tag/monotonic-stack/README.md)]

problems/2-keys-keyboard/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ In step 3, we use Paste operation to get &#39;AAA&#39;.
4747
</ul>
4848

4949
### Related Topics
50+
[[Math](../../tag/math/README.md)]
5051
[[Dynamic Programming](../../tag/dynamic-programming/README.md)]
5152

5253
### Similar Questions

problems/24-game/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,6 @@
6060
</ul>
6161

6262
### Related Topics
63-
[[Depth-first Search](../../tag/depth-first-search/README.md)]
63+
[[Array](../../tag/array/README.md)]
64+
[[Math](../../tag/math/README.md)]
65+
[[Backtracking](../../tag/backtracking/README.md)]

problems/3sum-closest/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
### Related Topics
3535
[[Array](../../tag/array/README.md)]
3636
[[Two Pointers](../../tag/two-pointers/README.md)]
37+
[[Sorting](../../tag/sorting/README.md)]
3738

3839
### Similar Questions
3940
1. [3Sum](../3sum) (Medium)

problems/3sum-smaller/README.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,13 @@
1111

1212
## [259. 3Sum Smaller (Medium)](https://leetcode.com/problems/3sum-smaller "较小的三数之和")
1313

14-
<p>Given an array of <i>n</i> integers <i>nums</i> and a <i>target</i>, find the number of index triplets <code>i, j, k</code> with <code>0 &lt;= i &lt; j &lt; k &lt; n</code> that satisfy the condition <code>nums[i] + nums[j] + nums[k] &lt; target</code>.</p>
1514

16-
<p><strong>Example:</strong></p>
17-
18-
<pre>
19-
<strong>Input:</strong> <i>nums</i> = <code>[-2,0,1,3]</code>, and <i>target</i> = 2
20-
<strong>Output:</strong> 2
21-
<strong>Explanation:</strong>&nbsp;Because there are two triplets which sums are less than 2:
22-
&nbsp; [-2,0,1]
23-
[-2,0,3]
24-
</pre>
25-
26-
<p><b style="font-family: sans-serif, Arial, Verdana, &quot;Trebuchet MS&quot;;">Follow up:</b> Could you solve it in <i>O</i>(<i>n</i><sup>2</sup>) runtime?</p>
2715

2816
### Related Topics
2917
[[Array](../../tag/array/README.md)]
3018
[[Two Pointers](../../tag/two-pointers/README.md)]
19+
[[Binary Search](../../tag/binary-search/README.md)]
20+
[[Sorting](../../tag/sorting/README.md)]
3121

3222
### Similar Questions
3323
1. [3Sum](../3sum) (Medium)

problems/3sum-with-multiplicity/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,8 @@ and two 2s from [2,2,2,2] in 6 ways.
5050
</ul>
5151

5252
### Related Topics
53+
[[Array](../../tag/array/README.md)]
54+
[[Hash Table](../../tag/hash-table/README.md)]
5355
[[Two Pointers](../../tag/two-pointers/README.md)]
56+
[[Counting](../../tag/counting/README.md)]
57+
[[Sorting](../../tag/sorting/README.md)]

problems/3sum/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
### Related Topics
3838
[[Array](../../tag/array/README.md)]
3939
[[Two Pointers](../../tag/two-pointers/README.md)]
40+
[[Sorting](../../tag/sorting/README.md)]
4041

4142
### Similar Questions
4243
1. [Two Sum](../two-sum) (Easy)

problems/4-keys-keyboard/README.md

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,44 +11,9 @@
1111

1212
## [651. 4 Keys Keyboard (Medium)](https://leetcode.com/problems/4-keys-keyboard "4键键盘")
1313

14-
<p>Imagine you have a special keyboard with the following keys: </p>
15-
<p><code>Key 1: (A)</code>: Print one 'A' on screen.</p>
16-
<p><code>Key 2: (Ctrl-A)</code>: Select the whole screen.</p>
17-
<p><code>Key 3: (Ctrl-C)</code>: Copy selection to buffer.</p>
18-
<p><code>Key 4: (Ctrl-V)</code>: Print buffer on screen appending it after what has already been printed. </p>
1914

2015

21-
22-
<p>Now, you can only press the keyboard for <b>N</b> times (with the above four keys), find out the maximum numbers of 'A' you can print on screen.</p>
23-
24-
25-
<p><b>Example 1:</b><br />
26-
<pre><b>Input:</b> N = 3
27-
<b>Output:</b> 3
28-
<b>Explanation:</b>
29-
We can at most get 3 A's on screen by pressing following key sequence:
30-
A, A, A
31-
</pre>
32-
</p>
33-
34-
<p><b>Example 2:</b><br />
35-
<pre><b>Input:</b> N = 7
36-
<b>Output:</b> 9
37-
<b>Explanation:</b>
38-
We can at most get 9 A's on screen by pressing following key sequence:
39-
A, A, A, Ctrl A, Ctrl C, Ctrl V, Ctrl V
40-
</pre>
41-
</p>
42-
43-
<p><b>Note:</b><br>
44-
<ol>
45-
<li>1 <= N <= 50 </li>
46-
<li>Answers will be in the range of 32-bit signed integer.</li>
47-
</ol>
48-
</p>
49-
5016
### Related Topics
51-
[[Greedy](../../tag/greedy/README.md)]
5217
[[Math](../../tag/math/README.md)]
5318
[[Dynamic Programming](../../tag/dynamic-programming/README.md)]
5419

0 commit comments

Comments
 (0)