---
title: 452. Minimum Number of Arrows to Burst Balloons
tags: Greedy
description: share source code.
---
# 452. Minimum Number of Arrows to Burst Balloons
```java=
class Solution {
public int findMinArrowShots(int[][] points) {
int n = points.length;
Arrays.sort(points, (a, b) -> Integer.compare(a[1], b[1]));
int shot = 1;
int last = points[0][1];
for(int i = 1; i < n; i++){
if(last < points[i][0]){
last = points[i][1];
shot++;
}
}
return shot;
}
}
```