Skip to content

Commit 02a097a

Browse files
added daily challenge
1 parent f55979b commit 02a097a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Solution:
2+
def findMinArrowShots(self, points: List[List[int]]) -> int:
3+
points.sort(key=lambda x: x[1])
4+
5+
arrows = 1
6+
prevEnd = points[0][1]
7+
8+
for i in range(1, len(points)):
9+
if points[i][0] > prevEnd:
10+
arrows += 1
11+
prevEnd = points[i][1]
12+
13+
return arrows

0 commit comments

Comments
 (0)