Skip to content

Commit a86c985

Browse files
committed
further fixed with naming convention
1 parent b7df4ff commit a86c985

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

maths/iterative_pair.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
from collections import Counter
33

44

5-
def sock_merchant(n: int, ar: list[int]) -> int:
5+
def sock_merchant(ar: list[int]) -> int:
66
"""
7-
>>> sockMerchant(9, [10, 20, 20, 10, 10, 30, 50, 10, 20])
7+
>>> sock_merchant([10, 20, 20, 10, 10, 30, 50, 10, 20])
88
3
9-
>>> sockMerchant(4, [1, 1, 3, 3])
9+
>>> sock_merchant([1, 1, 3, 3])
1010
2
1111
1212
"""
@@ -21,10 +21,8 @@ def sock_merchant(n: int, ar: list[int]) -> int:
2121

2222
if __name__ == "__main__":
2323

24-
n = int(input().strip())
24+
array = list(map(int, input().rstrip().split()))
2525

26-
ar = list(map(int, input().rstrip().split()))
27-
28-
result = sock_merchant(n, ar)
26+
result = sock_merchant(array)
2927
print(result)
3028
doctest.testmod()

0 commit comments

Comments
 (0)