From 96ca9ae7b33545bb3d7f8797dcd08d043adccc19 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Tue, 13 Aug 2024 02:44:31 +0900 Subject: Init --- 1_array_hashing/contains_duplicate.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '1_array_hashing/contains_duplicate.py') 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: -- cgit v1.2.3