Lesson 1 of 5
Live algorithm trace
Palindrome sentinels
Complete execution1 of 5
Place sentinels at both ends of `ab_a`.
1
left = 0; right = length - 12
skip non-alphanumeric characters3
if lowercase(left) != lowercase(right): return false4
left += 1; right -= 15
return trueleft = 0right = 3
Meet the two pointers, twin sentinels. One starts at the left edge, one at the right. They walk toward each other.