Skip to content

Commit 274735a

Browse files
author
Gonzalo Diaz
committed
[REFACTOR] clean code: variable naming
1 parent dd38a1f commit 274735a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/sherlock_and_anagrams.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
import math
55

66

7-
def sherlock_and_anagrams(s: str) -> int:
7+
def sherlock_and_anagrams(s_word: str) -> int:
88

99
candidates = {}
10-
size = len(s)
10+
size = len(s_word)
1111

1212
# Calculate all substrings
1313
for i in range(0, size):
1414
for j in range(0, size - i):
15-
substr = s[i:size - j]
15+
substr = s_word[i:size - j]
1616
print(f'i: {i}, {size} size - j: {size - j} | substr: {substr}')
1717

1818
# Add substrings to a candidate list.

0 commit comments

Comments
 (0)