Game of Thrones - I

  • + 0 comments
    from collections import Counter
    def gameOfThrones(s):
        freq=Counter(s)
        c=0
        for i in freq:
            if freq[i]%2==1:
                c+=1
        return 'NO' if c>1 else 'YES'