Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Double Substring by Moff
def double_substring(line):
result = 0
for i in range(len(line)):
for j in range(len(line) - i):
if line[i:i + j + 1] in line[i + j + 1:]:
result = max(result, j + 1)
return result
Aug. 14, 2017