



'''simple docstring'''

from collections import Counter
from timeit import timeit







def a_     (    __UpperCAmelCase = ""				,							)				->					bool:





			"""simple docstring"""







			return sum(c % 2 for c in Counter(input_str.replace(' '				,							''					).lower()					).values()					) < 2







def a_     (    __UpperCAmelCase = ""					)				->					bool:





			"""simple docstring"""







			if len(__UpperCAmelCase					) == 0:
						return True
			snake_case:    str      							=input_str.replace(' '				,							''					).lower()
			# character_freq_dict: Stores the frequency of every character in the input string
			snake_case:    dict[str, int]      							={}

			for character in lower_case_input_str:
						snake_case:    Optional[Any]      							=character_freq_dict.get(__UpperCAmelCase				,							0					) + 1
			snake_case:    Dict      							=0

			for character_count in character_freq_dict.values():
						if character_count % 2:
									odd_char += 1
			if odd_char > 1:
						return False
			return True







def a_     (    __UpperCAmelCase = ""					)				->					None:





			"""simple docstring"""







			print('\nFor string = '				,							__UpperCAmelCase				,							':'					)
			print(
			    '> can_string_be_rearranged_as_palindrome_counter()'				,							'\tans ='				,							can_string_be_rearranged_as_palindrome_counter(__UpperCAmelCase					)				,							'\ttime ='				,							timeit(
			        'z.can_string_be_rearranged_as_palindrome_counter(z.check_str)'				,							setup='import __main__ as z'				,							)				,							'seconds'				,							)
			print(
			    '> can_string_be_rearranged_as_palindrome()'				,							'\tans ='				,							can_string_be_rearranged_as_palindrome(__UpperCAmelCase					)				,							'\ttime ='				,							timeit(
			        'z.can_string_be_rearranged_as_palindrome(z.check_str)'				,							setup='import __main__ as z'				,							)				,							'seconds'				,							)


if __name__ == "__main__":
	a							   =				input(
	    'Enter string to determine if it can be rearranged as a palindrome or not: '
	).strip()
	benchmark(check_str)
	a							   =				can_string_be_rearranged_as_palindrome_counter(check_str)
	print(F"""{check_str} can {'' if status else 'not '}be rearranged as a palindrome""")









'''simple docstring'''

import os


# All paths are set with the intent you should run this script from the root of the repo with the command
# python utils/check_doctest_list.py
a							   =				'.'


if __name__ == "__main__":
	a							   =				os.path.join(REPO_PATH, 'utils/documentation_tests.txt')
	a							   =				[]
	a							   =				[]
	with open(doctest_file_path) as fp:
		for line in fp:
			a							   =				line.strip()
			a							   =				os.path.join(REPO_PATH, line)
			if not (os.path.isfile(path) or os.path.isdir(path)):
				non_existent_paths.append(line)
			all_paths.append(path)
	if len(non_existent_paths) > 0:
		a							   =				'\n'.join(non_existent_paths)
		raise ValueError(F"""`utils/documentation_tests.txt` contains non-existent paths:\n{non_existent_paths}""")
	if all_paths != sorted(all_paths):
		raise ValueError('Files in `utils/documentation_tests.txt` are not in alphabetical order.')




