Longest substrings without repeating characters: Difference between revisions

m
→‎{{header|REXX}}: simplified the code.
m (→‎{{header|REXX}}: updated the output.)
m (→‎{{header|REXX}}: simplified the code.)
Line 83:
do k=j+1 to L; x= x || substr($, k, 1) /*search for the max length substrings.*/
if \okx(x) then iterate j /*Are there an replications? Skip it. */
ss_= b || length(x); if _<maxL then iterate /*is length less then the /*build a possiblecurrent max? length substring*/
@._= length(ss)@._ x; if _<maxL= _ then iterate /*isadd lengththis lesssubstring thento the current max? list. */
@._= @._ ss; maxL= _ /*add this substring to the max list. */
end /*k*/
end /*j*/