Game of Thrones - I

  • + 0 comments

    Python 3

    from collections import Counter
    
    def gameOfThrones(s):     
        # Write your code here
        counts_s = Counter(s)
    
        vals = counts_s.values()
    
        uneven_count = 0
        for ii in vals:
            if ii % 2 != 0:
                uneven_count +=1 
    
        if uneven_count > 1:
            return "NO"
        else:
            return "YES"