Hackerrank solutions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

20 lines
390 B

#!/usr/bin/python3
# https://www.hackerrank.com/challenges/game-of-thrones
import sys
def is_palindrome_anagram(str):
chars = [ False ] * 26
for c in str:
chars[ord(c) - 97] ^= True
return sum(chars) <= 1
def main():
if is_palindrome_anagram(sys.stdin.readline().strip()):
print('YES')
else:
print('NO')
if __name__ == '__main__':
main()