DSA · Reimagined
Strings easy time O(n) space O(1)

Palindrome Check

A palindrome reads the same forwards and backwards. Compare the first and last characters, then step inward. A single mismatch means it is not a palindrome.

r
0
a
1
c
2
e
3
c
4
a
5
r
6

Check whether "racecar" is a palindrome.

1 / 5

Practice

Machine twin: /dsa-viz-v2/palindrome-check.json — the full deterministic run as structured data.