You are viewing a single comment's thread. Return to all comments →
def stringConstruction(s): return len(list(set(s)))
or
def stringConstruction(s): bitmask = 0 for char in s: bitmask |= (1 << (ord(char) - ord('a'))) return bin(bitmask).count('1')
Seems like cookies are disabled on this browser, please enable them to open this website
String Construction
You are viewing a single comment's thread. Return to all comments →
or