Problem
FAANG · LeetCode #125

Problem Recall: a visual LeetCode pattern drill

Valid Palindrome

A visual flashcard drill for FAANG LeetCode problems. See the problem, recognize the pattern, watch the solution animate. No walls of text — the motion is the explanation.

1The ProblemEasy

Valid Palindrome

Reads the same forwards and backwards (letters & digits only).

INPUT s ="A man, a plan, a canal: Panama"strip non-alphanumeric, lowercaseamanaplanacanalpanamaleft halfright half (reversed)pivotmirror matchreturntrue
Examples
"racecar"→ true"race a car"→ false
2The PatternTIME O(n) · SPACE O(1)

Two Pointers

Converging from both ends, comparing as they meet.

loop while left < right · move both inwarda0b1c2d3e4f5g6left›right‹compare → if equal, move both inward
Problems using this pattern
3The SolutionRESULT → true

Step through it

r0a1c2e3c4a5r6leftright
Initialize: left at 0, right at 6.
Step 1 / 5
Arrow keys to navigate · escape to reset

All problems by pattern

Backtracking

Recursive Descent

Frequently asked questions

What is Problem Recall?

Problem Recall is a visual flashcard drill for FAANG LeetCode problems. See the problem, recognize the pattern, watch the solution animate. No walls of text — the motion is the explanation.

How does a drill work?

Every problem has three stages: the problem, the pattern and the solution. Step through them with the Back and Next buttons or the ← and → arrow keys; Escape resets to the start.

Which problems are included?

31 LeetCode problems grouped into 11 patterns. They're all listed on this page, each with its own drill.

Do I need an account?

No. There's no sign-up: open any problem and start the drill.

Can I share a single problem?

Yes. Every problem has its own link (/p/ followed by the problem name), so you can bookmark or share it.