Skip to content

Commit 5d12a6c

Browse files
committed
add 3 books tab
1 parent 69aceb7 commit 5d12a6c

File tree

433 files changed

+3300
-2287
lines changed

Some content is hidden

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

433 files changed

+3300
-2287
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ jobs:
6969
cp -r src/plan ./dist/
7070
cp -r src/tag ./dist/
7171
cp -r src/problem ./dist/
72+
cp -r src/offer ./dist/
73+
cp -r src/offer2 ./dist/
74+
cp -r src/interview ./dist/
7275
cp -r src/image ./dist/
7376
7477
- name: push to main

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818
## 算法题解
1919

2020
- [LeetCode 题解](./src/problem/README.md)
21-
- [剑指 Offer](./src/plan/offer_list.md)
22-
- [剑指 Offer II](./src/plan/offer2_list.md)
21+
- [剑指 Offer](./src/offer/README.md)
22+
- [剑指 Offer II](./src/offer2/README.md)
23+
- [程序员面试金典](./src/interview/README.md)
2324

2425
## 专项突破
2526

assets/origins/interview_list.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: '目录'
3+
headerDepth: 0
4+
---
5+
6+
## 程序员面试金典
7+
8+
###### i_01.01、i_01.02、i_01.03、i_01.04、i_01.05、i_01.06、i_01.07、i_01.08、i_01.09、i_02.01、i_02.02、i_02.03、i_02.04、i_02.05、i_02.06、i_02.07、i_02.08、i_03.01、i_03.02、i_03.03、i_03.04、i_03.05、i_03.06、i_04.01、i_04.02、i_04.03、i_04.04、i_04.05、i_04.06、i_04.08、i_04.09、i_04.10、i_04.12、i_05.01、i_05.02、i_05.03、i_05.04、i_05.06、i_05.07、i_05.08、i_08.01、i_08.02、i_08.03、i_08.04、i_08.05、i_08.06、i_08.07、i_08.08、i_08.09、i_08.10、i_08.11、i_08.12、i_08.13、i_08.14、i_10.01、i_10.02、i_10.03、i_10.05、i_10.09、i_10.10、i_10.11、i_16.01、i_16.02、i_16.03、i_16.04、i_16.05、i_16.06、i_16.07、i_16.08、i_16.09、i_16.10、i_16.11、i_16.13、i_16.14、i_16.15、i_16.16、i_16.17、i_16.18、i_16.19、i_16.20、i_16.21、i_16.22、i_16.24、i_16.25、i_16.26、i_17.01、i_17.04、i_17.05、i_17.06、i_17.07、i_17.08、i_17.09、i_17.10、i_17.11、i_17.12、i_17.13、i_17.14、i_17.15、i_17.16、i_17.17、i_17.18、i_17.19、i_17.20、i_17.21、i_17.22、i_17.23、i_17.24、i_17.25、i_17.26
9+
10+
<style>
11+
table th:first-of-type { width: 20%; }
12+
table th:nth-of-type(2) { width: 30%; }
13+
table th:nth-of-type(3) { width: 10%; }
14+
table th:nth-of-type(4) { width: 30%; }
15+
table th:nth-of-type(5) { width: 10%; }
16+
17+
</style>

assets/origins/offer2_list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: '剑指 Offer II'
2+
title: '目录'
33
headerDepth: 0
44
---
55

6-
![](../image/plan-8.png =500x)
6+
## 剑指 Offer II
77

88
###### jz_offer_II_001、jz_offer_II_002、jz_offer_II_003、jz_offer_II_004、jz_offer_II_005、jz_offer_II_006、jz_offer_II_007、jz_offer_II_008、jz_offer_II_009、jz_offer_II_010、jz_offer_II_011、jz_offer_II_012、jz_offer_II_013、jz_offer_II_014、jz_offer_II_015、jz_offer_II_016、jz_offer_II_017、jz_offer_II_018、jz_offer_II_019、jz_offer_II_020、jz_offer_II_021、jz_offer_II_022、jz_offer_II_023、jz_offer_II_024、jz_offer_II_025、jz_offer_II_026、jz_offer_II_027、jz_offer_II_028、jz_offer_II_029、jz_offer_II_030、jz_offer_II_031、jz_offer_II_032、jz_offer_II_033、jz_offer_II_034、jz_offer_II_035、jz_offer_II_036、jz_offer_II_037、jz_offer_II_038、jz_offer_II_039、jz_offer_II_040、jz_offer_II_041、jz_offer_II_042、jz_offer_II_043、jz_offer_II_044、jz_offer_II_045、jz_offer_II_046、jz_offer_II_047、jz_offer_II_048、jz_offer_II_049、jz_offer_II_050、jz_offer_II_051、jz_offer_II_052、jz_offer_II_053、jz_offer_II_054、jz_offer_II_055、jz_offer_II_056、jz_offer_II_057、jz_offer_II_058、jz_offer_II_059、jz_offer_II_060、jz_offer_II_061、jz_offer_II_062、jz_offer_II_063、jz_offer_II_064、jz_offer_II_065、jz_offer_II_066、jz_offer_II_067、jz_offer_II_068、jz_offer_II_069、jz_offer_II_070、jz_offer_II_071、jz_offer_II_072、jz_offer_II_073、jz_offer_II_074、jz_offer_II_075、jz_offer_II_076、jz_offer_II_077、jz_offer_II_078、jz_offer_II_079、jz_offer_II_080、jz_offer_II_081、jz_offer_II_082、jz_offer_II_083、jz_offer_II_084、jz_offer_II_085、jz_offer_II_086、jz_offer_II_087、jz_offer_II_088、jz_offer_II_089、jz_offer_II_090、jz_offer_II_091、jz_offer_II_092、jz_offer_II_093、jz_offer_II_094、jz_offer_II_095、jz_offer_II_096、jz_offer_II_097、jz_offer_II_098、jz_offer_II_099、jz_offer_II_100、jz_offer_II_101、jz_offer_II_102、jz_offer_II_103、jz_offer_II_104、jz_offer_II_105、jz_offer_II_106、jz_offer_II_107、jz_offer_II_108、jz_offer_II_109、jz_offer_II_110、jz_offer_II_111、jz_offer_II_112、jz_offer_II_113、jz_offer_II_114、jz_offer_II_115、jz_offer_II_116、jz_offer_II_117、jz_offer_II_118、jz_offer_II_119
99

assets/origins/offer_list.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
title: '剑指 Offer'
2+
title: '目录'
33
headerDepth: 0
44
---
55

6-
![](../image/plan-7.png =500x)
6+
## 剑指 Offer
77

88
###### jz_offer_03_1、jz_offer_04_1、jz_offer_05_1、jz_offer_06_1、jz_offer_07_1、jz_offer_09_1、jz_offer_10_1、jz_offer_10_2、jz_offer_11_1、jz_offer_12_1、jz_offer_13_1、jz_offer_14_1、jz_offer_14_2、jz_offer_15_1、jz_offer_16_1、jz_offer_17_1、jz_offer_18_1、jz_offer_19_1、jz_offer_20_1、jz_offer_21_1、jz_offer_22_1、jz_offer_24_1、jz_offer_25_1、jz_offer_26_1、jz_offer_27_1、jz_offer_28_1、jz_offer_29_1、jz_offer_30_1、jz_offer_31_1、jz_offer_32_1、jz_offer_32_2、jz_offer_32_3、jz_offer_33_1、jz_offer_34_1、jz_offer_35_1、jz_offer_36_1、jz_offer_37_1、jz_offer_38_1、jz_offer_39_1、jz_offer_40_1、jz_offer_41_1、jz_offer_42_1、jz_offer_43_1、jz_offer_44_1、jz_offer_45_1、jz_offer_46_1、jz_offer_47_1、jz_offer_48_1、jz_offer_49_1、jz_offer_50_1、jz_offer_51_1、jz_offer_52_1、jz_offer_53_1、jz_offer_53_2、jz_offer_54_1、jz_offer_55_1、jz_offer_55_2、jz_offer_56_1、jz_offer_56_2、jz_offer_57_1、jz_offer_57_2、jz_offer_58_1、jz_offer_58_2、jz_offer_59_1、jz_offer_59_2、jz_offer_60_1、jz_offer_61_1、jz_offer_62_1、jz_offer_63_1、jz_offer_64_1、jz_offer_65_1、jz_offer_66_1、jz_offer_67_1、jz_offer_68_1、jz_offer_68_2
99

assets/output/3324.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# [3324. 出现在屏幕上的字符串序列](https://leetcode.com/problems/find-the-sequence-of-strings-appeared-on-the-screen)
2+
3+
🟠 <font color=#ffb800>Medium</font>&emsp; 🔗&ensp;[`LeetCode`](https://leetcode.com/problems/find-the-sequence-of-strings-appeared-on-the-screen)
4+
5+
## 题目
6+
7+
You are given a string `target`.
8+
9+
Alice is going to type `target` on her computer using a special keyboard that
10+
has **only two** keys:
11+
12+
* Key 1 appends the character `"a"` to the string on the screen.
13+
* Key 2 changes the **last** character of the string on the screen to its **next** character in the English alphabet. For example, `"c"` changes to `"d"` and `"z"` changes to `"a"`.
14+
15+
**Note** that initially there is an _empty_ string `""` on the screen, so she
16+
can **only** press key 1.
17+
18+
Return a list of _all_ strings that appear on the screen as Alice types
19+
`target`, in the order they appear, using the **minimum** key presses.
20+
21+
22+
23+
**Example 1:**
24+
25+
**Input:** target = "abc"
26+
27+
**Output:** ["a","aa","ab","aba","abb","abc"]
28+
29+
**Explanation:**
30+
31+
The sequence of key presses done by Alice are:
32+
33+
* Press key 1, and the string on the screen becomes `"a"`.
34+
* Press key 1, and the string on the screen becomes `"aa"`.
35+
* Press key 2, and the string on the screen becomes `"ab"`.
36+
* Press key 1, and the string on the screen becomes `"aba"`.
37+
* Press key 2, and the string on the screen becomes `"abb"`.
38+
* Press key 2, and the string on the screen becomes `"abc"`.
39+
40+
**Example 2:**
41+
42+
**Input:** target = "he"
43+
44+
**Output:** ["a","b","c","d","e","f","g","h","ha","hb","hc","hd","he"]
45+
46+
47+
48+
**Constraints:**
49+
50+
* `1 <= target.length <= 400`
51+
* `target` consists only of lowercase English letters.
52+
53+
54+
## 题目大意
55+
56+
给你一个字符串 `target`
57+
58+
Alice 将会使用一种特殊的键盘在她的电脑上输入 `target`,这个键盘**只有两个** 按键:
59+
60+
* 按键 1:在屏幕上的字符串后追加字符 `'a'`
61+
* 按键 2:将屏幕上字符串的 **最后一个** 字符更改为英文字母表中的 **下一个** 字符。例如,`'c'` 变为 `'d'``'z'` 变为 `'a'`
62+
63+
**注意** ,最初屏幕上是一个 __ 字符串 `""`,所以她**只能** 按按键 1。
64+
65+
请你考虑按键次数 **最少** 的情况,按字符串出现顺序,返回 Alice 输入 `target` 时屏幕上出现的所有字符串列表。
66+
67+
68+
69+
**示例 1:**
70+
71+
**输入:** target = "abc"
72+
73+
**输出:** ["a","aa","ab","aba","abb","abc"]
74+
75+
**解释:**
76+
77+
Alice 按键的顺序如下:
78+
79+
* 按下按键 1,屏幕上的字符串变为 `"a"`
80+
* 按下按键 1,屏幕上的字符串变为 `"aa"`
81+
* 按下按键 2,屏幕上的字符串变为 `"ab"`
82+
* 按下按键 1,屏幕上的字符串变为 `"aba"`
83+
* 按下按键 2,屏幕上的字符串变为 `"abb"`
84+
* 按下按键 2,屏幕上的字符串变为 `"abc"`
85+
86+
**示例 2:**
87+
88+
**输入:** target = "he"
89+
90+
**输出:** ["a","b","c","d","e","f","g","h","ha","hb","hc","hd","he"]
91+
92+
93+
94+
**提示:**
95+
96+
* `1 <= target.length <= 400`
97+
* `target` 仅由小写英文字母组成。
98+
99+
100+
## 解题思路
101+
102+
#### 复杂度分析
103+
104+
- **时间复杂度**`O()`
105+
- **空间复杂度**`O()`
106+
107+
## 代码
108+
109+
```javascript
110+
111+
```
112+
113+
## 相关题目
114+
115+
<!-- prettier-ignore -->
116+
| 题号 | 标题 | 题解 | 标签 | 难度 |
117+
| :------: | :------ | :------: | :------ | :------ |
118+
| 500 | [键盘行](https://leetcode.com/problems/keyboard-row) | | [`数组`](/tag/array.md) [`哈希表`](/tag/hash-table.md) [`字符串`](/tag/string.md) | <font color=#15bd66>Easy</font> |
119+
120+
<style>
121+
.blue {
122+
background-color: #096dd9;
123+
padding: 0.25rem 0.5rem;
124+
margin: 0;
125+
font-size: 0.85em;
126+
border-radius: 3px;
127+
color: white;
128+
font-weight: 500;
129+
}
130+
table th:first-of-type { width: 10%; }
131+
table th:nth-of-type(2) { width: 35%; }
132+
table th:nth-of-type(3) { width: 10%; }
133+
table th:nth-of-type(4) { width: 35%; }
134+
table th:nth-of-type(5) { width: 10%; }
135+
</style>

assets/output/3325.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# [3325. 字符至少出现 K 次的子字符串 I](https://leetcode.com/problems/count-substrings-with-k-frequency-characters-i)
2+
3+
🟠 <font color=#ffb800>Medium</font>&emsp; 🔗&ensp;[`LeetCode`](https://leetcode.com/problems/count-substrings-with-k-frequency-characters-i)
4+
5+
## 题目
6+
7+
Given a string `s` and an integer `k`, return the total number of substrings
8+
of `s` where **at least one** character appears **at least** `k` times.
9+
10+
11+
12+
**Example 1:**
13+
14+
**Input:** s = "abacb", k = 2
15+
16+
**Output:** 4
17+
18+
**Explanation:**
19+
20+
The valid substrings are:
21+
22+
* `"aba"` (character `'a'` appears 2 times).
23+
* `"abac"` (character `'a'` appears 2 times).
24+
* `"abacb"` (character `'a'` appears 2 times).
25+
* `"bacb"` (character `'b'` appears 2 times).
26+
27+
**Example 2:**
28+
29+
**Input:** s = "abcde", k = 1
30+
31+
**Output:** 15
32+
33+
**Explanation:**
34+
35+
All substrings are valid because every character appears at least once.
36+
37+
38+
39+
**Constraints:**
40+
41+
* `1 <= s.length <= 3000`
42+
* `1 <= k <= s.length`
43+
* `s` consists only of lowercase English letters.
44+
45+
46+
## 题目大意
47+
48+
给你一个字符串 `s` 和一个整数 `k`,在 `s` 的所有子字符串中,请你统计并返回 **至少有一个** 字符 **至少出现** `k`
49+
次的子字符串总数。
50+
51+
**子字符串** 是字符串中的一个连续、**非空** 的字符序列。
52+
53+
54+
55+
**示例 1:**
56+
57+
**输入:** s = "abacb", k = 2
58+
59+
**输出:** 4
60+
61+
**解释:**
62+
63+
符合条件的子字符串如下:
64+
65+
* `"aba"`(字符 `'a'` 出现 2 次)。
66+
* `"abac"`(字符 `'a'` 出现 2 次)。
67+
* `"abacb"`(字符 `'a'` 出现 2 次)。
68+
* `"bacb"`(字符 `'b'` 出现 2 次)。
69+
70+
**示例 2:**
71+
72+
**输入:** s = "abcde", k = 1
73+
74+
**输出:** 15
75+
76+
**解释:**
77+
78+
所有子字符串都有效,因为每个字符至少出现一次。
79+
80+
81+
82+
**提示:**
83+
84+
* `1 <= s.length <= 3000`
85+
* `1 <= k <= s.length`
86+
* `s` 仅由小写英文字母组成。
87+
88+
89+
## 解题思路
90+
91+
#### 复杂度分析
92+
93+
- **时间复杂度**`O()`
94+
- **空间复杂度**`O()`
95+
96+
## 代码
97+
98+
```javascript
99+
100+
```

0 commit comments

Comments
 (0)