mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Optimization problem_10 in project_euler (#2453)
* optimization for problem09 in project_euler * added benchmark code * fixup! Format Python code with psf/black push * Update project_euler/problem_09/sol1.py Co-authored-by: Christian Clauss <cclauss@me.com> * updating DIRECTORY.md * Update project_euler/problem_09/sol1.py * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@@ -8,7 +8,9 @@ from timeit import timeit
|
||||
# Counter is faster for long strings and non-Counter is faster for short strings.
|
||||
|
||||
|
||||
def can_string_be_rearranged_as_palindrome_counter(input_str: str = "",) -> bool:
|
||||
def can_string_be_rearranged_as_palindrome_counter(
|
||||
input_str: str = "",
|
||||
) -> bool:
|
||||
"""
|
||||
A Palindrome is a String that reads the same forward as it does backwards.
|
||||
Examples of Palindromes mom, dad, malayalam
|
||||
|
||||
Reference in New Issue
Block a user