Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d1ccf8d

Browse files
authored
Update 0452.用最少数量的箭引爆气球.md
1 parent cff523c commit d1ccf8d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎problems/0452.用最少数量的箭引爆气球.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ int findMinArrowShots(int** points, int pointsSize, int* pointsColSize){
272272
```Rust
273273
impl Solution {
274274
pub fn find_min_arrow_shots(mut points: Vec<Vec<i32>>) -> i32 {
275+
if points.is_empty() {
276+
return 0;
277+
}
275278
points.sort_by_key(|point| point[0]);
276279
let mut result = 1;
277280
for i in 1..points.len() {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /