Valid Palindrome

You are given a string s consisting only of lowercase English letters and digits. Determine whether s is a palindrome — that is, whether it reads exactly the…

You are given a string `s` consisting only of lowercase English letters and digits. Determine whether `s` is a palindrome — that is, whether it reads exactly the same forwards and backwards. Return `true` if `s` is a palindrome and `false` otherwise. For example, `"racecar"` reads the same in both directions, so the answer is `true`. `"hello"` does not, so the answer is `false`.

- `1 <= s.length <= 1000` - The string consists only of lowercase English letters (a-z) and digits (0-9). - The string is already clean — no spaces, punctuation, or uppercase letters. - No case folding or character stripping is required.

Example 1: input s = "racecar"; output true. Reading "racecar" backwards gives "racecar" — identical to the original, so it is a palindrome.

Example 2: input s = "hello"; output false. Reading "hello" backwards gives "olleh", which differs from "hello", so it is not a palindrome.

Example 3: input s = "a"; output true. A single character is always a palindrome — the same read in either direction.

Category: Strings. Topic: strings. Difficulty: Easy. Patterns: two-pointers.