<h3><a title="题目描述" href="https://leetcode-cn.com/problems/minimum-number-of-arrows-to-burst-balloons/">题目描述</a></h3>
![file](https://i.loli.net/2020/11/23/CcoWHL9EFubyNze.png)
<h4>方法一</h4>
```java
class Solution {
public int findMinArrowShots(int[][] points) {
if(points.length==0){
return 0;
}
Arrays.sort(points,new Comparator<int[]>(){
public int compare(int[] point1,int[] point2){
if(point1[1] > point2[1]){
return 1;
}else if(point1[1] < point2[1]){
return -1;
}else{
return 0;
}
}
});
int pos = points[0][1], res = 1;
for(int[] x:points){
if(x[0] > pos){
res++;
pos = x[1];
}
}
return res;
}
}
```
## 思路
- sort匿名函数重写
- 以右边界为标志更新。
Leetcode452 用最少数量的箭引爆气球