Mastering Technical Interviews: The Unique Characters Problem
Valeria Rozenbaum
4

How about this one:

from collections import Counter
def is_unique(string):
if not string:
return True # Empty string is unique, i guess?
return Counter(string).most_common(1)[0][1] == 1
# tests
assert is_unique(‘abc’)
assert not is_unique(‘abcc’)
assert is_unique(‘’)
assert is_unique(None)
A single golf clap? Or a long standing ovation?

By clapping more or less, you can signal to us which stories really stand out.