further fixed with naming convention

This commit is contained in:
souvikghosh05 2021-11-03 22:25:35 +05:30
parent b7df4ff8a9
commit a86c985b8b
No known key found for this signature in database
GPG Key ID: 1CE1EF8556B0B862

View File

@ -2,11 +2,11 @@ import doctest
from collections import Counter from collections import Counter
def sock_merchant(n: int, ar: list[int]) -> int: def sock_merchant(ar: list[int]) -> int:
""" """
>>> sockMerchant(9, [10, 20, 20, 10, 10, 30, 50, 10, 20]) >>> sock_merchant([10, 20, 20, 10, 10, 30, 50, 10, 20])
3 3
>>> sockMerchant(4, [1, 1, 3, 3]) >>> sock_merchant([1, 1, 3, 3])
2 2
""" """
@ -21,10 +21,8 @@ def sock_merchant(n: int, ar: list[int]) -> int:
if __name__ == "__main__": if __name__ == "__main__":
n = int(input().strip()) array = list(map(int, input().rstrip().split()))
ar = list(map(int, input().rstrip().split())) result = sock_merchant(array)
result = sock_merchant(n, ar)
print(result) print(result)
doctest.testmod() doctest.testmod()