Write a function that will check whether the permutation of an input string is a palindrome. Bonus points for a solution that is efficient and/or that uses _only_ built-in language functions. Deem yourself **brilliant** if you can come up with a version that does not use _any_ function whatsoever.

# Example 

  `madam` -> True   
  `adamm` -> True   
  `junk`  -> False  
  
## Hint 
The brute force approach would be to generate _all_ the permutations of the string and check each one of them whether it is a palindrome. However, an optimized approach will not require this at all.

Difficulty: EASY
Starter code: def permute_a_palindrome(stg):
	

Solutions:
def permute_a_palindrome(input):
	return sum((input.count(c) % 2 for c in set(input))) < 2


def permute_a_palindrome(txt):
	return len([txt.count(c) for c in txt if txt.count(c) % 2]) < 2


def permute_a_palindrome(stg):
	return sum((stg.count(c) % 2 for c in set(stg))) == len(stg) % 2


def permute_a_palindrome(input):
	res = 0
	for c in input.lower():
		res = res ^ 1 << ord(c) - 71
	return res == res & -res


from functools import reduce
from operator import xor

def permute_a_palindrome(input_):
	return len(reduce(xor, [set(c) for c in input_], set())) <= 1


permute_a_palindrome = lambda s: sum((f % 2 for f in __import__('collections').Counter(s).values())) < 2


from collections import Counter

def permute_a_palindrome(s):
	return sum((1 for c in Counter(s).values() if c % 2)) < 2


from collections import Counter

def permute_a_palindrome(s: str) -> bool:
	return len(s) % 2 == sum((i % 2 for i in list(Counter(s).values())))


def permute_a_palindrome(string):
	even = 0
	odd = 0
	letters = list()
	for elem in string:
		if elem not in letters:
			letters.append(elem)
			if string.count(elem) % 2 == 0:
				even += 1
			else:
				odd += 1
	if len(string) % 2 != 0 and odd == 1 or (len(string) % 2 == 0 and odd == 0):
		return True
	return False


def permute_a_palindrome(input):
	a = 'abcdefghijklmnopqrstuvwxyz'
	times = [0] * len(a)
	if input == '':
		return True
	if len(input) % 2 == 0:
		for x in range(0, len(a)):
			times[x] = input.count(a[x])
		print(times)
		for y in times:
			if not y % 2 == 0:
				return False
		else:
			return True
	else:
		count = 0
		for x in range(0, len(a)):
			times[x] = input.count(a[x])
		for y in times:
			if not y % 2 == 0 and count > 0:
				return False
			if not y % 2 == 0:
				count += 1
		else:
			return True