Update array-check-if-exist.py

This commit is contained in:
bt3gl 2023-07-30 15:54:07 -07:00 committed by GitHub
parent 79f1970f2e
commit 0672ae9a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,3 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# author: bt3gl
""" """
Given an array arr of integers, check if there exist two indices i and j such that : Given an array arr of integers, check if there exist two indices i and j such that :
@ -24,4 +28,4 @@ def check_if_exist(arr: list[int]) -> bool:
if __name__ == "__main__": if __name__ == "__main__":
arr = [-2, 0, 10, -19, 4, 6, -8] arr = [-2, 0, 10, -19, 4, 6, -8]
print(check_if_exist(arr)) print(check_if_exist(arr))