mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
42d2c138ba
commit
f39e16846b
@ -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:dict = {}
|
||||
d: dict = {}
|
||||
for i in arr:
|
||||
if i in d:
|
||||
d[i] += 1
|
||||
|
Loading…
Reference in New Issue
Block a user