Easy Text

Palindrome Check

Receives a string of text and checks whether it reads the same forwards and backwards. It uses the classic two-pointer technique: one pointer starts at the beginning, the other at the end, and on each step they compare the characters they point to. As soon as a pair does not match, the string cannot be a palindrome and the check stops immediately; otherwise both pointers move one position toward each other until they meet (an odd-length string leaves its middle character unchecked) or cross (an even-length string has every pair compared). The comparison is case-sensitive and exact — no letters, spaces or punctuation are ignored. Returns true when every pair of characters matches, and false otherwise.

Visualization

Input

Algorithm code

Custom input

Saved inputs

References