Home/Blog/Guide & Examples

Strings & Palindrome Check (Two-Pointer Technique) in Structograms

2026-11-225 min read

Two Pointers Without Extra Memory

Compare characters from both ends toward the middle and exit early as soon as a mismatch occurs.

Live Example (DIN 66261)

Rendered directly in DIN 66261 — click to open and edit in the workspace.

istPalindrom(wort)l = 0; r = laenge(wort) - 1; ok = wahrok = falschl = l + 1; r = r - 1wort[l] != wort[r]wahrfalschl < r UND okRückgabe: ok

More Articles