Skip to content

Commit 62b4e8c

Browse files
longsizhuogithub-actions[bot]
authored andcommitted
chore(docs): sync doc metadata [skip ci]
1 parent 41dee68 commit 62b4e8c

2 files changed

Lines changed: 32 additions & 12 deletions

File tree

app/docs/CommunityShare/Leetcode/3138. Minimum Length of Anagram Concatenation.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tags:
88
- String
99
- Counting
1010
abbrlink: d1339d55
11+
docId: o3knuvbpnki6isfjv3g5ohau
1112
---
1213

1314
# Description:
@@ -22,24 +23,25 @@ An anagram is formed by rearranging the letters of a string. For example, "aab",
2223
#### Example 1:
2324

2425
Input: s = "abba"
25-
26+
2627
Output: 2
27-
28+
2829
Explanation:
29-
30+
3031
One possible string t could be "ba".
3132

3233
#### Example 2:
3334

3435
Input: s = "cdef"
35-
36+
3637
Output: 4
37-
38+
3839
Explanation:
39-
40+
4041
One possible string t could be "cdef", notice that t can be equal to s.
4142

4243
# Thinking:
44+
4345
Since the problem naturally suggests using a counting method (`Counter`), we need to find the minimum substring for each string. For example, for `abba`, the result is `ab`; for `cdef`, it's `cdef`.
4446
We iterate from length `1` (a single character) onwards, slicing the string to get the current substring.
4547

@@ -50,6 +52,7 @@ Next, we only need to check if the count of each character in the current substr
5052
因为最开始我们对原始字符串进行了Counter,得到了字符数量和字符对应的字典。接下来我们只需要判断当前子串的Counter到的某个字符的数值乘以`n/k`是否等于原始字符串的Counter的值即可(即当前子串乘以x倍是否等于源字符串)。
5153

5254
# Code:
55+
5356
```python
5457
import collections
5558
class Solution:
@@ -73,4 +76,4 @@ class Solution:
7376
for i in range(1, n+1):
7477
if n % i == 0 and check(i):
7578
return i
76-
```
79+
```

generated/doc-contributors.json

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"repo": "InvolutionHell/involutionhell",
3-
"generatedAt": "2025-12-15T03:07:22.770Z",
3+
"generatedAt": "2025-12-16T03:06:38.320Z",
44
"docsDir": "app/docs",
5-
"totalDocs": 143,
5+
"totalDocs": 144,
66
"results": [
77
{
88
"docId": "ue27z7z95yzw3lhhfj7nit1c",
@@ -2451,6 +2451,23 @@
24512451
}
24522452
]
24532453
},
2454+
{
2455+
"docId": "o3knuvbpnki6isfjv3g5ohau",
2456+
"path": "app/docs/CommunityShare/Leetcode/3138. Minimum Length of Anagram Concatenation.md",
2457+
"contributorStats": {
2458+
"114939201": 1
2459+
},
2460+
"contributors": [
2461+
{
2462+
"githubId": "114939201",
2463+
"contributions": 1,
2464+
"lastContributedAt": "2025-12-16T03:00:39.000Z",
2465+
"login": "longsizhuo",
2466+
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
2467+
"htmlUrl": "https://github.com/longsizhuo"
2468+
}
2469+
]
2470+
},
24542471
{
24552472
"docId": "udm0daiek9dr22xq4doep5w4",
24562473
"path": "app/docs/CommunityShare/Leetcode/345. 反转字符串中的元音字母_translated.md",
@@ -2540,13 +2557,13 @@
25402557
"docId": "l358imxaj1mmtth6dydvu54s",
25412558
"path": "app/docs/CommunityShare/Leetcode/76最小覆盖子串_translated.md",
25422559
"contributorStats": {
2543-
"114939201": 1
2560+
"114939201": 2
25442561
},
25452562
"contributors": [
25462563
{
25472564
"githubId": "114939201",
2548-
"contributions": 1,
2549-
"lastContributedAt": "2025-12-15T03:00:08.000Z",
2565+
"contributions": 2,
2566+
"lastContributedAt": "2025-12-15T03:07:23.000Z",
25502567
"login": "longsizhuo",
25512568
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
25522569
"htmlUrl": "https://github.com/longsizhuo"

0 commit comments

Comments
 (0)