Skip to content

Commit 42613d5

Browse files
author
Gonzalo Diaz
committed
[Hacker Rank] Interview Preparation Kit: Dictionaries and Hashmaps: Sherlock and Anagrams. Standard logging mechanism.
1 parent e227130 commit 42613d5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hackerrank/interview_preparation_kit/dictionaries_and_hashmaps/sherlock_and_anagrams.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
from typing import Dict, List
55
import math
66

7+
import logging
8+
9+
LOGGER = logging.getLogger(__name__)
10+
711

812
def sherlock_and_anagrams(s_word: str) -> int:
913

@@ -40,6 +44,6 @@ def sherlock_and_anagrams(s_word: str) -> int:
4044
math.factorial(k) * math.factorial(quantity_of_anagrams - k)
4145
)
4246

43-
print(f'filtered candidates: {count}')
47+
LOGGER.debug('Sherlock_and_anagrams() Filtered candidates %i', count)
4448

4549
return count

0 commit comments

Comments
 (0)