less than 1 minute read

You are given a string s containing lowercase and uppercase alphabet characters as well as digits from "0" to "9". Return whether s is a palindrome if we only consider the lowercase alphabet characters.

Constraints

  • 0 ≤ n ≤ 100,000 where n is the length of s

https://binarysearch.com/problems/Noisy-Palindrome

Examples

Example 1

Input

  • s = a92bcbXa

Output

  • answer = True

Explanation

If we only consider the lowercase characters, then s is "abcba" which is a palindrome.

Example 2

Input

  • s = abZ

Output

  • answer = False

Solution

Categories:

Updated:

Leave a comment