diff options
Diffstat (limited to '1_array_hashing/contains_duplicate.py')
| -rw-r--r-- | 1_array_hashing/contains_duplicate.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/1_array_hashing/contains_duplicate.py b/1_array_hashing/contains_duplicate.py index 142bcca..e437e4f 100644 --- a/1_array_hashing/contains_duplicate.py +++ b/1_array_hashing/contains_duplicate.py @@ -21,17 +21,20 @@ Output: false """ +from typing import List + + class Solution: # 1. brute force - def brute_force(self, nums: list[int]) -> bool: + def brute_force(self, nums: List[int]) -> bool: return False # 2. sorting - def sorting(self, nums: list[int]) -> bool: + def sorting(self, nums: List[int]) -> bool: return False # 3. hashset - def hashset(self, nums: list[int]) -> bool: + def hashset(self, nums: List[int]) -> bool: hs = set() for i in range(len(nums)): if nums[i] in hs: |
