strings.can_string_be_rearranged_as_palindrome

Attributes

check_str

Functions

benchmark(→ None)

Benchmark code for comparing above 2 functions

can_string_be_rearranged_as_palindrome(→ bool)

A Palindrome is a String that reads the same forward as it does backwards.

can_string_be_rearranged_as_palindrome_counter(→ bool)

A Palindrome is a String that reads the same forward as it does backwards.

Module Contents

strings.can_string_be_rearranged_as_palindrome.benchmark(input_str: str = '') None

Benchmark code for comparing above 2 functions

strings.can_string_be_rearranged_as_palindrome.can_string_be_rearranged_as_palindrome(input_str: str = '') bool

A Palindrome is a String that reads the same forward as it does backwards. Examples of Palindromes mom, dad, malayalam >>> can_string_be_rearranged_as_palindrome(“Momo”) True >>> can_string_be_rearranged_as_palindrome(“Mother”) False >>> can_string_be_rearranged_as_palindrome(“Father”) False >>> can_string_be_rearranged_as_palindrome_counter(“A man a plan a canal Panama”) True

strings.can_string_be_rearranged_as_palindrome.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 >>> can_string_be_rearranged_as_palindrome_counter(“Momo”) True >>> can_string_be_rearranged_as_palindrome_counter(“Mother”) False >>> can_string_be_rearranged_as_palindrome_counter(“Father”) False >>> can_string_be_rearranged_as_palindrome_counter(“A man a plan a canal Panama”) True

strings.can_string_be_rearranged_as_palindrome.check_str