updated code

This commit is contained in:
siddwarr 2023-10-03 21:15:20 +05:30
parent 8bf754d373
commit 42d2c138ba

View File

@ -27,7 +27,7 @@ def pairs_with_sum(arr: list, req_sum: int) -> int:
>>> pairs_with_sum([1,7,6,2,5,4,3,1,9,8],7)
4
"""
d = {}
d:dict = {}
for i in arr:
if i in d:
d[i] += 1