Longest substrings without repeating characters: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: matched an invocation to the procedure name.) |
(→{{header|Wren}}: Tidy.) |
||
Line 495: | Line 495: | ||
System.print("The longest substring(s) of the following without repeating characters are:\n") |
System.print("The longest substring(s) of the following without repeating characters are:\n") |
||
var strs = ["xyzyabcybdfd", "xyzyab", "zzzzz", "a", "" |
var strs = ["xyzyabcybdfd", "xyzyab", "zzzzz", "a", ""] |
||
for (s in strs) { |
for (s in strs) { |
||
var longest = [] |
var longest = [] |
||
Line 506: | Line 506: | ||
longestLen = ss.count |
longestLen = ss.count |
||
} |
} |
||
longest.add(ss |
longest.add(ss) |
||
} |
} |
||
} |
} |