1. Valid Palindrome

less than 1 minute read

125. Valid Palindrome

문제

Given a string s, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.

조건

  • $1 \le s.length \le 2 * 10^{5}$
  • s consists only of printable ASCII characters.

예제

Example 1:
Input: s = "A man, a plan, a canal: Panama"
Output: true
Explanation: "amanaplanacanalpanama" is a palindrome.

Example 2:
Input: s = "race a car"
Output: false
Explanation: "raceacar" is not a palindrome.

해결

1st

1 코드

Updated: