From c5d28828011a89e408dc53cd61a812058c6c74ac Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Sat, 12 Oct 2024 21:14:03 +0900 Subject: modified two_sum.py --- 1_array_hashing/two_sum.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1_array_hashing/two_sum.py b/1_array_hashing/two_sum.py index 676c32b..42ad48e 100644 --- a/1_array_hashing/two_sum.py +++ b/1_array_hashing/two_sum.py @@ -36,12 +36,12 @@ Constraints: -10,000,000 <= target <= 10,000,000 """ -from typing import List +from typing import Dict, List class Solution: def hashmap(self, nums: List[int], target: int) -> List[int]: - hm: dict = {} + hm: Dict = {} for i, index in enumerate(nums): if target - index in hm: return [hm[target - index], i] -- cgit v1.2.3