Skip to content

Commit 79b1392

Browse files
authored
Merge pull request #1546 from ivanpenaloza/february12
adding algo
2 parents 649b8a2 + 00ac38c commit 79b1392

21 files changed

Lines changed: 101 additions & 315 deletions

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def twoSum(self, nums: List[int], target: int) -> List[int]:
1010

1111
if v in answer:
1212
return [answer[v], k]
13-
else:
13+
else:
1414
answer[target - v] = k
15-
15+
1616
return []

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_2.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_3.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_4.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_5.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_6.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_7.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_8.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/two_sum_round_9.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/my_project/interviews/amazon_high_frequency_23/common_algos/valid_palindrome_round_1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ def isPalindrome(self, s: str) -> bool:
1111
# Remove non-alphanumeric characters
1212
s = re.sub(pattern=r'[^a-zA-Z0-9]', repl='', string=s)
1313

14-
# Determine if it is palindrome or not
15-
14+
# Determine if s is palindrome or not
1615
len_s = len(s)
1716

1817
for i in range(len_s//2):
19-
18+
2019
if s[i] != s[len_s - 1 - i]:
2120
return False
2221

23-
return True
22+
return True
23+

0 commit comments

Comments
 (0)