Longest palindromic substrings: Difference between revisions

m
→‎Phix: as per recent Raku mod, skip the s[i]=s[i] test
m (→‎{{header|Raku}}: Don't bother check to see if a character is equal to itself. Pro tip: it is.)
m (→‎Phix: as per recent Raku mod, skip the s[i]=s[i] test)
Line 385:
sequence res = {}
for i=1 to length(s) do
for j=0 to iff(i>1 and s[i-1]=s[i]?12:01) do
integer rev = j,
fwd = 01
while rev<i and i+fwd<=length(s) and s[i-rev]=s[i+fwd] do
rev += 1
7,813

edits