Skip to content

Commit 750396a

Browse files
authored
Merge branch 'doocs:main' into main
2 parents 3f1e28e + 0fe1388 commit 750396a

File tree

174 files changed

+9779
-860
lines changed

Some content is hidden

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

174 files changed

+9779
-860
lines changed

solution/0000-0099/0023.Merge k Sorted Lists/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ tags:
3535
1->3->4,
3636
2->6
3737
]
38-
merging them into one sorted list:
38+
merging them into one sorted linked list:
3939
1->1->2->3->4->4->5->6
4040
</pre>
4141

solution/0200-0299/0282.Expression Add Operators/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ tags:
2222

2323
<p>Note that operands in the returned expressions <strong>should not</strong> contain leading zeros.</p>
2424

25+
<p><strong>Note</strong> that a number can contain multiple digits.</p>
26+
2527
<p>&nbsp;</p>
2628
<p><strong class="example">Example 1:</strong></p>
2729

solution/0400-0499/0405.Convert a Number to Hexadecimal/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0400-0499/0405.Co
55
tags:
66
- 位运算
77
- 数学
8+
- 字符串
89
---
910

1011
<!-- problem:start -->

solution/0400-0499/0405.Convert a Number to Hexadecimal/README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/0400-0499/0405.Co
55
tags:
66
- Bit Manipulation
77
- Math
8+
- String
89
---
910

1011
<!-- problem:start -->

solution/0500-0599/0504.Base 7/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ difficulty: 简单
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/0500-0599/0504.Base%207/README.md
55
tags:
66
- 数学
7+
- 字符串
78
---
89

910
<!-- problem:start -->

solution/0500-0599/0504.Base 7/README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ difficulty: Easy
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/0500-0599/0504.Base%207/README_EN.md
55
tags:
66
- Math
7+
- String
78
---
89

910
<!-- problem:start -->

solution/0600-0699/0630.Course Schedule III/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ func (h *hp) pop() int { return heap.Pop(h).(int) }
179179
```ts
180180
function scheduleCourse(courses: number[][]): number {
181181
courses.sort((a, b) => a[1] - b[1]);
182-
const pq = new MaxPriorityQueue();
182+
const pq = new MaxPriorityQueue<number>();
183183
let s = 0;
184184
for (const [duration, last] of courses) {
185185
pq.enqueue(duration);
186186
s += duration;
187187
while (s > last) {
188-
s -= pq.dequeue().element;
188+
s -= pq.dequeue();
189189
}
190190
}
191191
return pq.size();

solution/0600-0699/0630.Course Schedule III/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@ func (h *hp) pop() int { return heap.Pop(h).(int) }
170170
```ts
171171
function scheduleCourse(courses: number[][]): number {
172172
courses.sort((a, b) => a[1] - b[1]);
173-
const pq = new MaxPriorityQueue();
173+
const pq = new MaxPriorityQueue<number>();
174174
let s = 0;
175175
for (const [duration, last] of courses) {
176176
pq.enqueue(duration);
177177
s += duration;
178178
while (s > last) {
179-
s -= pq.dequeue().element;
179+
s -= pq.dequeue();
180180
}
181181
}
182182
return pq.size();

solution/0600-0699/0630.Course Schedule III/Solution.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
function scheduleCourse(courses: number[][]): number {
22
courses.sort((a, b) => a[1] - b[1]);
3-
const pq = new MaxPriorityQueue();
3+
const pq = new MaxPriorityQueue<number>();
44
let s = 0;
55
for (const [duration, last] of courses) {
66
pq.enqueue(duration);
77
s += duration;
88
while (s > last) {
9-
s -= pq.dequeue().element;
9+
s -= pq.dequeue();
1010
}
1111
}
1212
return pq.size();

solution/0800-0899/0871.Minimum Number of Refueling Stops/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,14 @@ func (h *hp) Pop() any {
206206

207207
```ts
208208
function minRefuelStops(target: number, startFuel: number, stations: number[][]): number {
209-
const pq = new MaxPriorityQueue();
209+
const pq = new MaxPriorityQueue<number>();
210210
let [ans, pre] = [0, 0];
211211
stations.push([target, 0]);
212212
for (const [pos, fuel] of stations) {
213213
const dist = pos - pre;
214214
startFuel -= dist;
215215
while (startFuel < 0 && !pq.isEmpty()) {
216-
startFuel += pq.dequeue().element;
216+
startFuel += pq.dequeue();
217217
ans++;
218218
}
219219
if (startFuel < 0) {

0 commit comments

Comments
 (0)