mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-22 08:21:12 -04:00
Update array-check-if-exist.py
This commit is contained in:
parent
17f53eb593
commit
15135b757e
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ def check_if_exist(arr: list[int]) -> bool:
|
|||
aux_dict = {}
|
||||
|
||||
for i, num in enumerate(arr):
|
||||
aux_dict[2*num] = i
|
||||
aux_dict[2 * num] = i
|
||||
|
||||
for j, num in enumerate(arr):
|
||||
if num in aux_dict.keys() and j != aux_dict[num]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue