Skip to content

Commit f649951

Browse files
committed
更正题目
1 parent b88e48a commit f649951

19 files changed

+635
-402
lines changed

README.adoc

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,12 +1504,12 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
15041504
|
15051505

15061506
//|{counter:codes}
1507-
//|{leetcode_base_url}/add-and-search-word-data-structure-design/[211. Add and Search Word - Data structure design^]
1508-
//|{source_base_url}/_0211_AddAndSearchWordDataStructureDesign.java[Java]
1509-
//|{doc_base_url}/0211-add-and-search-word-data-structure-design.adoc[题解]
1507+
//|{leetcode_base_url}/design-add-and-search-words-data-structure/[211. 添加与搜索单词 - 数据结构设计]
1508+
//|{source_base_url}/_0211_DesignAddAndSearchWordsDataStructure.java[Java]
1509+
//|{doc_base_url}/0211-design-add-and-search-words-data-structure.adoc[题解]
15101510
//|Medium
15111511
//|
1512-
//
1512+
15131513
//|{counter:codes}
15141514
//|{leetcode_base_url}/word-search-ii/[212. Word Search II^]
15151515
//|{source_base_url}/_0212_WordSearchII.java[Java]
@@ -3462,14 +3462,14 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
34623462
//|{doc_base_url}/0490-the-maze.adoc[题解]
34633463
//|Medium
34643464
//|
3465-
//
3465+
34663466
//|{counter:codes}
3467-
//|{leetcode_base_url}/increasing-subsequences/[491. Increasing Subsequences^]
3468-
//|{source_base_url}/_0491_IncreasingSubsequences.java[Java]
3469-
//|{doc_base_url}/0491-increasing-subsequences.adoc[题解]
3467+
//|{leetcode_base_url}/non-decreasing-subsequences/[491. 非递减子序列]
3468+
//|{source_base_url}/_0491_NonDecreasingSubsequences.java[Java]
3469+
//|{doc_base_url}/0491-non-decreasing-subsequences.adoc[题解]
34703470
//|Medium
34713471
//|
3472-
//
3472+
34733473
//|{counter:codes}
34743474
//|{leetcode_base_url}/construct-the-rectangle/[492. Construct the Rectangle^]
34753475
//|{source_base_url}/_0492_ConstructTheRectangle.java[Java]
@@ -3651,14 +3651,14 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
36513651
//|{doc_base_url}/0517-super-washing-machines.adoc[题解]
36523652
//|Hard
36533653
//|
3654-
//
3654+
36553655
//|{counter:codes}
3656-
//|{leetcode_base_url}/coin-change-2/[518. Coin Change 2^]
3657-
//|{source_base_url}/_0518_CoinChange2.java[Java]
3658-
//|{doc_base_url}/0518-coin-change-2.adoc[题解]
3656+
//|{leetcode_base_url}/coin-change-ii/[518. 零钱兑换 II]
3657+
//|{source_base_url}/_0518_CoinChangeIi.java[Java]
3658+
//|{doc_base_url}/0518-coin-change-ii.adoc[题解]
36593659
//|Medium
36603660
//|
3661-
//
3661+
36623662
//|{counter:codes}
36633663
//|{leetcode_base_url}/random-flip-matrix/[519. Random Flip Matrix^]
36643664
//|{source_base_url}/_0519_RandomFlipMatrix.java[Java]
@@ -3954,12 +3954,12 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
39543954
|前缀和
39553955

39563956
//|{counter:codes}
3957-
//|{leetcode_base_url}/array-partition-i/[561. Array Partition I^]
3958-
//|{source_base_url}/_0561_ArrayPartitionI.java[Java]
3959-
//|{doc_base_url}/0561-array-partition-i.adoc[题解]
3957+
//|{leetcode_base_url}/array-partition/[561. 数组拆分]
3958+
//|{source_base_url}/_0561_ArrayPartition.java[Java]
3959+
//|{doc_base_url}/0561-array-partition.adoc[题解]
39603960
//|Easy
39613961
//|
3962-
//
3962+
39633963
//|{counter:codes}
39643964
//|{leetcode_base_url}/longest-line-of-consecutive-one-in-matrix/[562. Longest Line of Consecutive One in Matrix^]
39653965
//|{source_base_url}/_0562_LongestLineOfConsecutiveOneInMatrix.java[Java]
@@ -5821,14 +5821,14 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
58215821
//|{doc_base_url}/0827-making-a-large-island.adoc[题解]
58225822
//|Hard
58235823
//|
5824-
//
5824+
58255825
//|{counter:codes}
5826-
//|{leetcode_base_url}/unique-letter-string/[828. Unique Letter String^]
5827-
//|{source_base_url}/_0828_UniqueLetterString.java[Java]
5828-
//|{doc_base_url}/0828-unique-letter-string.adoc[题解]
5826+
//|{leetcode_base_url}/count-unique-characters-of-all-substrings-of-a-given-string/[828. 统计子串中的唯一字符]
5827+
//|{source_base_url}/_0828_CountUniqueCharactersOfAllSubstringsOfAGivenString.java[Java]
5828+
//|{doc_base_url}/0828-count-unique-characters-of-all-substrings-of-a-given-string.adoc[题解]
58295829
//|Hard
58305830
//|
5831-
//
5831+
58325832
//|{counter:codes}
58335833
//|{leetcode_base_url}/consecutive-numbers-sum/[829. Consecutive Numbers Sum^]
58345834
//|{source_base_url}/_0829_ConsecutiveNumbersSum.java[Java]
@@ -7214,14 +7214,14 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
72147214
//|{doc_base_url}/1026-maximum-difference-between-node-and-ancestor.adoc[题解]
72157215
//|Medium
72167216
//|
7217-
//
7217+
72187218
//|{counter:codes}
7219-
//|{leetcode_base_url}/longest-arithmetic-sequence/[1027. Longest Arithmetic Sequence^]
7220-
//|{source_base_url}/_1027_LongestArithmeticSequence.java[Java]
7221-
//|{doc_base_url}/1027-longest-arithmetic-sequence.adoc[题解]
7219+
//|{leetcode_base_url}/longest-arithmetic-subsequence/[1027. 最长等差数列]
7220+
//|{source_base_url}/_1027_LongestArithmeticSubsequence.java[Java]
7221+
//|{doc_base_url}/1027-longest-arithmetic-subsequence.adoc[题解]
72227222
//|Medium
72237223
//|
7224-
//
7224+
72257225
//|{counter:codes}
72267226
//|{leetcode_base_url}/recover-a-tree-from-preorder-traversal/[1028. Recover a Tree From Preorder Traversal^]
72277227
//|{source_base_url}/_1028_RecoverATreeFromPreorderTraversal.java[Java]
@@ -8453,14 +8453,14 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
84538453
//|{doc_base_url}/1203-sort-items-by-groups-respecting-dependencies.adoc[题解]
84548454
//|Hard
84558455
//|
8456-
//
8456+
84578457
//|{counter:codes}
8458-
//|{leetcode_base_url}/last-person-to-fit-in-the-elevator/[1204. Last Person to Fit in the Elevator^]
8459-
//|{source_base_url}/_1204_LastPersonToFitInTheElevator.java[Java]
8460-
//|{doc_base_url}/1204-last-person-to-fit-in-the-elevator.adoc[题解]
8458+
//|{leetcode_base_url}/last-person-to-fit-in-the-bus/[1204. 最后一个能进入巴士的人]
8459+
//|{source_base_url}/_1204_LastPersonToFitInTheBus.java[Java]
8460+
//|{doc_base_url}/1204-last-person-to-fit-in-the-bus.adoc[题解]
84618461
//|Medium
84628462
//|
8463-
//
8463+
84648464
//|{counter:codes}
84658465
//|{leetcode_base_url}/monthly-transactions-ii/[1205. Monthly Transactions II^]
84668466
//|{source_base_url}/_1205_MonthlyTransactionsII.java[Java]
@@ -8544,14 +8544,14 @@ TIP: **公众号的微信号是: `jikerizhi`**。__因为众所周知的原因
85448544
//|{doc_base_url}/1216-valid-palindrome-iii.adoc[题解]
85458545
//|Hard
85468546
//|
8547-
//
8547+
85488548
//|{counter:codes}
8549-
//|{leetcode_base_url}/play-with-chips/[1217. Play with Chips^]
8550-
//|{source_base_url}/_1217_PlayWithChips.java[Java]
8551-
//|{doc_base_url}/1217-play-with-chips.adoc[题解]
8549+
//|{leetcode_base_url}/minimum-cost-to-move-chips-to-the-same-position/[1217. 玩筹码]
8550+
//|{source_base_url}/_1217_MinimumCostToMoveChipsToTheSamePosition.java[Java]
8551+
//|{doc_base_url}/1217-minimum-cost-to-move-chips-to-the-same-position.adoc[题解]
85528552
//|Easy
85538553
//|
8554-
//
8554+
85558555
//|{counter:codes}
85568556
//|{leetcode_base_url}/longest-arithmetic-subsequence-of-given-difference/[1218. Longest Arithmetic Subsequence of Given Difference^]
85578557
//|{source_base_url}/_1218_LongestArithmeticSubsequenceOfGivenDifference.java[Java]

docs/0000-27-dp-2-unbounded-knapsack.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
== 经典题目
66

77
. xref:0322-coin-change.adoc[322. Coin Change]
8-
. xref:0518-coin-change-2.adoc[518. Coin Change 2]
8+
. xref:0518-coin-change-ii.adoc[518. Coin Change 2]
99
. xref:1449-form-largest-integer-with-digits-that-add-up-to-target.adoc[1449. Form Largest Integer With Digits That Add up to Target]
1010
. xref:1547-minimum-cost-to-cut-a-stick.adoc[1547. Minimum Cost to Cut a Stick]
1111
. xref:1891-cutting-ribbons.adoc[1891. Cutting Ribbons]

docs/0211-add-and-search-word-data-structure-design.adoc

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
[#0211-design-add-and-search-words-data-structure]
2+
= 211. 添加与搜索单词 - 数据结构设计
3+
4+
https://leetcode.cn/problems/design-add-and-search-words-data-structure/[LeetCode - 211. 添加与搜索单词 - 数据结构设计 ^]
5+
6+
请你设计一个数据结构,支持 添加新单词 和 查找字符串是否与任何先前添加的字符串匹配 。
7+
8+
实现词典类 `WordDictionary`
9+
10+
* `WordDictionary()` 初始化词典对象
11+
* `void addWord(word)``word` 添加到数据结构中,之后可以对它进行匹配
12+
* `bool search(word)` 如果数据结构中存在字符串与 `word` 匹配,则返回 `true` ;否则,返回 `false``word` 中可能包含一些 `.`,每个 `.` 都可以表示任何一个字母。
13+
14+
*示例:*
15+
16+
....
17+
输入:
18+
["WordDictionary","addWord","addWord","addWord","search","search","search","search"]
19+
[[],["bad"],["dad"],["mad"],["pad"],["bad"],[".ad"],["b.."]]
20+
输出:
21+
[null,null,null,null,false,true,true,true]
22+
23+
解释:
24+
WordDictionary wordDictionary = new WordDictionary();
25+
wordDictionary.addWord("bad");
26+
wordDictionary.addWord("dad");
27+
wordDictionary.addWord("mad");
28+
wordDictionary.search("pad"); // 返回 False
29+
wordDictionary.search("bad"); // 返回 True
30+
wordDictionary.search(".ad"); // 返回 True
31+
wordDictionary.search("b.."); // 返回 True
32+
....
33+
34+
*提示:*
35+
36+
* `+1 <= word.length <= 25+`
37+
* `addWord` 中的 `word` 由小写英文字母组成
38+
* `search` 中的 `word`'.' 或小写英文字母组成
39+
* 最多调用 `10^4^``addWord``search`
40+
41+
42+
== 思路分析
43+
44+
45+
[[src-0211]]
46+
[tabs]
47+
====
48+
一刷::
49+
+
50+
--
51+
[{java_src_attr}]
52+
----
53+
include::{sourcedir}/_0211_DesignAddAndSearchWordsDataStructure.java[tag=answer]
54+
----
55+
--
56+
57+
// 二刷::
58+
// +
59+
// --
60+
// [{java_src_attr}]
61+
// ----
62+
// include::{sourcedir}/_0211_DesignAddAndSearchWordsDataStructure_2.java[tag=answer]
63+
// ----
64+
// --
65+
====
66+
67+
68+
== 参考资料
69+
70+

docs/0491-increasing-subsequences.adoc

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
[#0491-non-decreasing-subsequences]
2+
= 491. 非递减子序列
3+
4+
https://leetcode.cn/problems/non-decreasing-subsequences/[LeetCode - 491. 非递减子序列 ^]
5+
6+
给你一个整数数组 `nums`,找出并返回所有该数组中不同的递增子序列,递增子序列中 *至少有两个元素*。你可以按 *任意顺序* 返回答案。
7+
8+
数组中可能含有重复元素,如出现两个整数相等,也可以视作递增序列的一种特殊情况。
9+
10+
*示例 1:*
11+
12+
....
13+
输入:nums = [4,6,7,7]
14+
输出:[[4,6],[4,6,7],[4,6,7,7],[4,7],[4,7,7],[6,7],[6,7,7],[7,7]]
15+
....
16+
17+
*示例 2:*
18+
19+
....
20+
输入:nums = [4,4,3,2,1]
21+
输出:[[4,4]]
22+
....
23+
24+
*提示:*
25+
26+
* `+1 <= nums.length <= 15+`
27+
* `+-100 <= nums[i] <= 100+`
28+
29+
30+
31+
== 思路分析
32+
33+
34+
[[src-0491]]
35+
[tabs]
36+
====
37+
一刷::
38+
+
39+
--
40+
[{java_src_attr}]
41+
----
42+
include::{sourcedir}/_0491_NonDecreasingSubsequences.java[tag=answer]
43+
----
44+
--
45+
46+
// 二刷::
47+
// +
48+
// --
49+
// [{java_src_attr}]
50+
// ----
51+
// include::{sourcedir}/_0491_NonDecreasingSubsequences_2.java[tag=answer]
52+
// ----
53+
// --
54+
====
55+
56+
57+
== 参考资料
58+
59+

0 commit comments

Comments
 (0)