05. Palindrome Sentence
β GFG solution to the Palindrome Sentence problem: check if a string is palindromic after removing non-alphanumeric characters and converting to lowercase using two pointers technique. π
π§© Problem Description
π Examples
Example 1
Input: s = "Too hot to hoot"
Output: true
Explanation: If we remove all non-alphanumeric characters and convert all uppercase letters to lowercase,
string s will become "toohottohoot" which is a palindrome.Example 2
Input: s = "Abc 012..## 10cbA"
Output: true
Explanation: If we remove all non-alphanumeric characters and convert all uppercase letters to lowercase,
string s will become "abc01210cba" which is a palindrome.Example 3
π Constraints
β
My Approach
Two Pointers Technique
π Time and Auxiliary Space Complexity
π§βπ» Code (C++)
β Code (Java)
π Code (Python)
π§ Contribution and Support
πVisitor Count
Last updated