FAANG · LeetCode #125
Valid Palindrome — three-stage drill
1The ProblemEasy
Valid Palindrome
Reads the same forwards and backwards (letters & digits only).
Examples
"racecar"→ true"race a car"→ false
2The PatternTIME O(n) · SPACE O(1)
Two Pointers
Converging from both ends, comparing as they meet.
Problems using this pattern
3The SolutionRESULT → true
Step through it
Initialize: left at 0, right at 6.
Step 1 / 5
Arrow keys to navigate · escape to reset