0125. Valid Palindrome
Easy | Two Pointer | 36 ms (95.59%), 14.7 MB (61.30%)
Last updated
Was this helpful?
Easy | Two Pointer | 36 ms (95.59%), 14.7 MB (61.30%)
Last updated
Was this helpful?
Source: GitHub:
Given a string s
, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
Note that when left > right
inside the while loop and the algorithm has not returned the False, we could return True directly.