Game of Thrones - I

  • + 0 comments
    from collections import Counter
    def gameOfThrones(s):
        c = dict(Counter(s))
        odd = 0
        for i in c.values():
            if i % 2 != 0:
                odd+=1
            if odd > 1:
                return "NO"
        return "YES"