Skip to content

Commit 7501e8d

Browse files
committed
1 parent 28986d0 commit 7501e8d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
def solution(targets):
2+
answer = 0
3+
targets.sort(key=lambda x: [x[1], x[0]])
4+
5+
s = e = 0
6+
for target in targets:
7+
if target[0] >= e:
8+
answer += 1
9+
e = target[1]
10+
11+
return answer

0 commit comments

Comments
 (0)