0452.用最少数量的箭引爆气球 Java代码修改
This commit is contained in:
parent
b2df4ad5e5
commit
056f816448
|
|
@ -151,6 +151,7 @@ class Solution {
|
||||||
//重叠气球的最小右边界
|
//重叠气球的最小右边界
|
||||||
int leftmostRightBound = points[0][1];
|
int leftmostRightBound = points[0][1];
|
||||||
//如果下一个气球的左边界大于最小右边界
|
//如果下一个气球的左边界大于最小右边界
|
||||||
|
for(int i = 1; i < points.length; i++){
|
||||||
if (points[i][0] > leftmostRightBound ) {
|
if (points[i][0] > leftmostRightBound ) {
|
||||||
//增加一次射击
|
//增加一次射击
|
||||||
count++;
|
count++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue