Skip to content

Commit 92ea9e3

Browse files
longsizhuogithub-actions[bot]
authored andcommitted
chore(docs): sync doc metadata [skip ci]
1 parent b6a378c commit 92ea9e3

File tree

2 files changed

+34
-15
lines changed

2 files changed

+34
-15
lines changed

app/docs/CommunityShare/Leetcode/3072. 将元素分配到两个数组中 II_translated.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 3072. Allocate elements into two arrays II.md
3-
date: '2024.01.01 0:00'
3+
date: "2024.01.01 0:00"
44
tags:
55
- - Python
66
- - answer
@@ -9,12 +9,14 @@ tags:
99
- Array
1010
- simulation
1111
abbrlink: 48a38683
12+
docId: r12u8o7j73oxhbvgphi939fb
1213
---
1314

1415
# topic:
1516

1617
[3072. Allocate elements into two arrays II.md](https://leetcode.cn/problems/distribute-elements-into-two-arrays-ii/description/?envType=daily-question&envId=2024-06-05)
1718
"""
19+
1820
<p>Give you a bidding <strong>1</strong> start、Length <code>n</code> 的整数Array <code>nums</code> 。</p>
1921

2022
<p>Now define function <code>greaterCount</code> ,Make <code>greaterCount(arr, val)</code> 返回Array <code>arr</code> middle<strong> Strict</strong> <code>val</code> Number of elements。</p>
@@ -81,20 +83,20 @@ therefore,连接形成的Array result yes [3,3,3,3] 。
8183
"""
8284

8385
# Thought:
86+
8487
1. initialization:
85-
首先Will nums Array反转,以便我们可以从最后一个元素start处理。这一步exist最初与学长@Angro beatICPCI learned,`pop()` Compare `pop(0)` It is much faster。
86-
Will反转后的第一个元素分配给 arr1 and temp1,The second element is allocated to arr2 and temp2。
88+
首先Will nums Array反转,以便我们可以从最后一个元素start处理。这一步exist最初与学长@Angro beatICPCI learned,`pop()` Compare `pop(0)` It is much faster。
89+
Will反转后的第一个元素分配给 arr1 and temp1,The second element is allocated to arr2 and temp2。
8790

8891
2. Iteration processing each element:
89-
use while Traversal nums Array的剩余元素。
90-
For each element,use bisect.bisect_right exist arr1 and arr2 middle找到Compare当前元素小的元素的数量。
91-
Re -uselen(arr1)andlen(arr2)Minus this quantity,得到Compare当前元素大的元素的数量。
92-
然后进行Compare较To。 为了use二分查找,therefore我们要保证 arr1 and arr2 yes有序的, Pythonmiddleuse `insort()` To。
93-
but同时我们要维持一个答案Array,thereforeappendTo。
92+
use while Traversal nums Array的剩余元素。
93+
For each element,use bisect.bisect_right exist arr1 and arr2 middle找到Compare当前元素小的元素的数量。
94+
Re -uselen(arr1)andlen(arr2)Minus this quantity,得到Compare当前元素大的元素的数量。
95+
然后进行Compare较To。 为了use二分查找,therefore我们要保证 arr1 and arr2 yes有序的, Pythonmiddleuse `insort()` To。
96+
but同时我们要维持一个答案Array,thereforeappendTo。
9497

9598
3. Merge answer
9699

97-
98100
# Code:
99101

100102
```python
@@ -132,4 +134,4 @@ class Solution:
132134
temp1.append(temp)
133135

134136
return temp1 + temp2
135-
```
137+
```

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-01T03:07:26.387Z",
3+
"generatedAt": "2025-12-02T03:05:18.981Z",
44
"docsDir": "app/docs",
5-
"totalDocs": 129,
5+
"totalDocs": 130,
66
"results": [
77
{
88
"docId": "ue27z7z95yzw3lhhfj7nit1c",
@@ -2140,13 +2140,13 @@
21402140
"docId": "ksw2vic4alf1tdnnueay81g8",
21412141
"path": "app/docs/CommunityShare/Leetcode/2131. 连接两字母单词得到的最长回文串.md",
21422142
"contributorStats": {
2143-
"114939201": 1
2143+
"114939201": 2
21442144
},
21452145
"contributors": [
21462146
{
21472147
"githubId": "114939201",
2148-
"contributions": 1,
2149-
"lastContributedAt": "2025-12-01T03:00:37.000Z",
2148+
"contributions": 2,
2149+
"lastContributedAt": "2025-12-01T03:07:27.000Z",
21502150
"login": "longsizhuo",
21512151
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
21522152
"htmlUrl": "https://github.com/longsizhuo"
@@ -2272,6 +2272,23 @@
22722272
}
22732273
]
22742274
},
2275+
{
2276+
"docId": "r12u8o7j73oxhbvgphi939fb",
2277+
"path": "app/docs/CommunityShare/Leetcode/3072. 将元素分配到两个数组中 II_translated.md",
2278+
"contributorStats": {
2279+
"114939201": 1
2280+
},
2281+
"contributors": [
2282+
{
2283+
"githubId": "114939201",
2284+
"contributions": 1,
2285+
"lastContributedAt": "2025-12-02T03:00:09.000Z",
2286+
"login": "longsizhuo",
2287+
"avatarUrl": "https://avatars.githubusercontent.com/u/114939201?v=4",
2288+
"htmlUrl": "https://github.com/longsizhuo"
2289+
}
2290+
]
2291+
},
22752292
{
22762293
"docId": "udm0daiek9dr22xq4doep5w4",
22772294
"path": "app/docs/CommunityShare/Leetcode/345. 反转字符串中的元音字母_translated.md",

0 commit comments

Comments
 (0)