Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
8-liner: clean solution in Clear category for Long Non Repeat by przemyslaw.daniel
def non_repeat(string):
result = ''
for i in range(len(string)):
for j in range(i, len(string)):
substr = string[i:j+1]
if len(set(substr)) == len(substr):
result = max(result, substr, key=len)
return result
Aug. 21, 2017