Skip to content

Commit 1271955

Browse files
committed
Runtime: 334 ms (Top 5.05%) | Memory: 14.9 MB (Top 23.23%)
1 parent b2f219f commit 1271955

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/C/Construct K Palindrome Strings/Construct K Palindrome Strings.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 334 ms (Top 5.05%) | Memory: 14.9 MB (Top 23.23%)
12
class Solution:
23
def canConstruct(self, s: str, k: int) -> bool:
34
characters, numOfOdds = {}, 0
@@ -8,4 +9,4 @@ def canConstruct(self, s: str, k: int) -> bool:
89
for key in characters:
910
if characters[key]%2 != 0:
1011
numOfOdds += 1
11-
return numOfOdds <= k and k <= len(s)
12+
return numOfOdds <= k and k <= len(s)

0 commit comments

Comments
 (0)