Изменения
→Псевдокод
== Псевдокод ==
<code>
procedure FillPalMatrix(s: string); Function F(i, for j):= 1 to n do begin if LMat[ij, j] :=1; for i:= j -1downto 1 do begin count:= Mat[i + 1, j]; k t:= j; while Ss[it] <> Ss[ki] k--do dec(t); R1 found:= F(t - i + 1, j); if t >= i <> k R2 + 2 then found:= F(Mat[i + 1, k t - 1) ] + 2 else R2 = 1; if R1 > R2 L[i, j] count < found then count:= R1found; else LMat[i, j] := R2 return L[i, j]count;
</code>