
from collections import Counter
from timeit import timeit




def 					__magic_name__					(  __lowerCAmelCase      :		str = ""						,    )     ->  List[Any]:
				return sum(c % 2 for c in Counter(input_str.replace(''' '''						,    ''''''				).lower()				).values()				) < 2




def 					__magic_name__					(  __lowerCAmelCase      :		Optional[Any] = ""				)     ->  List[str]:
				if len(__lowercase				) == 0:
								return True
				__lowerCamelCase          =      input_str.replace(''' '''						,    ''''''				).lower()
				# character_freq_dict: Stores the frequency of every character in the input string
				__lowerCamelCase          =      {}

				for character in lower_case_input_str:
								__lowerCamelCase          =      character_freq_dict.get(__lowercase						,    0				) + 1
				__lowerCamelCase          =      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 					__magic_name__					(  __lowerCAmelCase      :		List[Any] = ""				)     ->  List[Any]:
				print('''\nFor string = '''						,    __lowercase						,    ''':'''				)
				print(
				    '''> can_string_be_rearranged_as_palindrome_counter()'''						,    '''\tans ='''						,    can_string_be_rearranged_as_palindrome_counter(__lowercase				)						,    '''\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(__lowercase				)						,    '''\ttime ='''						,    timeit(
				        '''z.can_string_be_rearranged_as_palindrome(z.check_str)'''						,    setup='''import __main__ as z'''						,    )						,    '''seconds'''						,    )


if __name__ == "__main__":
					SCREAMING_SNAKE_CASE__  :     int   				=       input(
					    "Enter string to determine if it can be rearranged as a palindrome or not: "
					).strip()
					benchmark(check_str)
					SCREAMING_SNAKE_CASE__  :     Tuple   				=       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 numpy as np
from cva import destroyAllWindows, imread, imshow, waitKey







class 					_a :





     '''simple docstring'''



     def __init__(				self							,__a							,__a							,__a							)      ->				Tuple:
          if dst_width < 0 or dst_height < 0:
               raise ValueError("""Destination width/height should be > 0"""							)

          snake_case			:      str        =			img
          snake_case			:      str        =			img.shape[1]
          snake_case			:      Union[str, Any]        =			img.shape[0]
          snake_case			:      Optional[int]        =			dst_width
          snake_case			:      List[str]        =			dst_height

          snake_case			:      List[str]        =			self.src_w / self.dst_w
          snake_case			:      int        =			self.src_h / self.dst_h

          snake_case			:      List[Any]        =			(
              np.ones((self.dst_h, self.dst_w, 3)							,np.uinta							) * 255
          )







     def 			snake_case_      (				self							)      ->				int:
          for i in range(self.dst_h							):
               for j in range(self.dst_w							):
                    snake_case			:      Optional[Any]        =			self.img[self.get_y(__a							)][self.get_x(__a							)]







     def 			snake_case_      (				self							,__a							)      ->				int:
          return int(self.ratio_x * x							)







     def 			snake_case_      (				self							,__a							)      ->				int:
          return int(self.ratio_y * y							)


if __name__ == "__main__":
      lowercase,	lowercase      :   Optional[int]      =       800, 600
      lowercase      :   Union[str, Any]      =       imread("""image_data/lena.jpg""", 1)
      lowercase      :   int      =       NearestNeighbour(im, dst_w, dst_h)
      n.process()

      imshow(
          F"""Image resized from: {im.shape[1]}x{im.shape[0]} to {dst_w}x{dst_h}""", n.output
      )
      waitKey(0)
      destroyAllWindows()



