R
a
c
e
c
a
r
[0][1][2][3][4][5][6][7]
Brute · clean + reverse
▸1clean ← lowercased alphanumerics of s2return clean == reverse(clean)
state
- cleaned"racecar"
Your free access ends in 7 days — and you haven’t tried it yet. Watch one algorithm run, start to finish. It takes about two minutes.
Try one problemGiven a string, return true if it is a palindrome considering only alphanumeric characters and ignoring case.
▸1clean ← lowercased alphanumerics of s2return clean == reverse(clean)
line 1A string is a palindrome if it reads the same forwards and backwards, ignoring case and non-alphanumeric characters. Easiest idea: strip those out, lowercase, and compare to the reverse.