Skip to content

Commit b124d48

Browse files
committed
Add solved numberGame
1 parent 6556f00 commit b124d48

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Programmers/level3/numberGame.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def solution(A, B):
2+
answer = 0
3+
A.sort()
4+
B.sort()
5+
a, b = 0, 0
6+
l = len(A)
7+
while a < l and b < l:
8+
if A[a] < B[b]:
9+
answer += 1
10+
a += 1
11+
b += 1
12+
else:
13+
b += 1
14+
return answer

0 commit comments

Comments
 (0)