Skip to content

Commit c9fef3c

Browse files
longsizhuogithub-actions[bot]
authored andcommitted
chore(docs): sync doc metadata [skip ci]
1 parent 14de502 commit c9fef3c

File tree

2 files changed

+32
-9
lines changed

2 files changed

+32
-9
lines changed

app/docs/CommunityShare/Leetcode/2341. 数组能形成多少数对_translated.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,30 @@ tags:
44
- - Python
55
- - answer
66
abbrlink: f953c753
7-
date: '2024.01.01 0:00'
7+
date: "2024.01.01 0:00"
8+
docId: s3w19zdm6yhkhj4o0ba3kbal
89
---
910

1011
# topic:
1112

1213
[2341. How much can the array be formed.md](https://leetcode.cn/problems/maximum-number-of-pairs-in-array/description/)
1314

1415
# Thought:
16+
1517
## I am:
18+
1619
I don't know if I saw it“Simple”Two words,This question has the initiative to think about the optimal solution。Actually this timeylbBig guy's hash table method is still fast。
1720
Sort the list,Whether two or two are equal to whether。
21+
1822
## Hash tableThought:
23+
1924
CounterAfter counting,`a+=v//2`,`b+=v%2`For each number x,
2025
if x Number of times v more than the 1,You can choose two from the array x Form a number pair,we willv Divide 2 Take down,
2126
You can get the current number x Number pairs that can be formed,Then we accumulate this number to the variable s middle。
2227

2328
# Code:
2429

25-
```python Ordinary count
30+
```python Ordinary count
2631
class Solution:
2732
def numberOfPairs(self, nums: List[int]) -> List[int]:
2833
nums.sort()
@@ -34,7 +39,8 @@ class Solution:
3439
nums[index - 1] = nums[index] = -1
3540
return ans
3641
```
37-
```python Hash table
42+
43+
```python Hash table
3844
class Solution:
3945
def numberOfPairs(self, nums: List[int]) -> List[int]:
4046
x = Counter(nums)
@@ -44,4 +50,4 @@ class Solution:
4450
a+=v//2
4551
b+=v%2
4652
return [a,b]
47-
```
53+
```

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-12T03:07:57.932Z",
3+
"generatedAt": "2025-12-13T03:06:52.333Z",
44
"docsDir": "app/docs",
5-
"totalDocs": 140,
5+
"totalDocs": 141,
66
"results": [
77
{
88
"docId": "ue27z7z95yzw3lhhfj7nit1c",
@@ -2340,6 +2340,23 @@
23402340
}
23412341
]
23422342
},
2343+
{
2344+
"docId": "s3w19zdm6yhkhj4o0ba3kbal",
2345+
"path": "app/docs/CommunityShare/Leetcode/2341. 数组能形成多少数对_translated.md",
2346+
"contributorStats": {
2347+
"114939201": 1
2348+
},
2349+
"contributors": [
2350+
{
2351+
"githubId": "114939201",
2352+
"contributions": 1,
2353+
"lastContributedAt": "2025-12-13T03:00:10.000Z",
2354+
"login": "longsizhuo",
2355+
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
2356+
"htmlUrl": "https://github.com/longsizhuo"
2357+
}
2358+
]
2359+
},
23432360
{
23442361
"docId": "lnx1bszj5aqqqfa50sejjv7n",
23452362
"path": "app/docs/CommunityShare/Leetcode/2639. 查询网格图中每一列的宽度_translated.md",
@@ -2378,13 +2395,13 @@
23782395
"docId": "y0ntwlksnvj7ymuapqvkvmwr",
23792396
"path": "app/docs/CommunityShare/Leetcode/2894. 分类求和并作差.md",
23802397
"contributorStats": {
2381-
"114939201": 1
2398+
"114939201": 2
23822399
},
23832400
"contributors": [
23842401
{
23852402
"githubId": "114939201",
2386-
"contributions": 1,
2387-
"lastContributedAt": "2025-12-12T03:00:48.000Z",
2403+
"contributions": 2,
2404+
"lastContributedAt": "2025-12-12T03:07:58.000Z",
23882405
"login": "longsizhuo",
23892406
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
23902407
"htmlUrl": "https://github.com/longsizhuo"

0 commit comments

Comments
 (0)