Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 036d929

Browse files
refactor 452
1 parent 446b964 commit 036d929

File tree

1 file changed

+0
-25
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-25
lines changed

src/main/java/com/fishercoder/solutions/_452.java

-25
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,6 @@
22

33
import java.util.Arrays;
44

5-
/**
6-
*452. Minimum Number of Arrows to Burst Balloons
7-
*
8-
* There are a number of spherical balloons spread in two-dimensional space.
9-
* For each balloon, provided input is the start and end coordinates of the horizontal diameter.
10-
* Since it's horizontal, y-coordinates don't matter and hence the x-coordinates of start and end of the diameter suffice.
11-
* Start is always smaller than end. There will be at most 104 balloons.
12-
*
13-
* An arrow can be shot up exactly vertically from different points along the x-axis.
14-
* A balloon with xstart and xend bursts by an arrow shot at x if xstart ≤ x ≤ xend.
15-
* There is no limit to the number of arrows that can be shot.
16-
* An arrow once shot keeps travelling up infinitely.
17-
* The problem is to find the minimum number of arrows that must be shot to burst all balloons.
18-
19-
Example:
20-
21-
Input:
22-
[[10,16], [2,8], [1,6], [7,12]]
23-
24-
Output:
25-
2
26-
27-
Explanation:
28-
One way is to shoot one arrow for example at x = 6 (bursting the balloons [2,8] and [1,6]) and another arrow at x = 11 (bursting the other two balloons).
29-
*/
305
public class _452 {
316

327
public static class Solution1 {

0 commit comments

Comments
 (0)