Over-thinking will not get you there though : )

The trick is QUITE easy: # of unique chars.

def stringConstruction(s):
    return len(set(s))

 

转载于:https://wwwblogs/tonix/p/8084300.html

更多推荐

HackerRank - String Construction