#K92222. Palindrome Sentence Checker
Palindrome Sentence Checker
Palindrome Sentence Checker
You are given a list of sentences. For each sentence, you must determine whether it is a palindrome after pre-processing. The pre-processing involves removing all non-alphanumeric characters and converting all uppercase letters to lowercase. A sentence is considered a palindrome if it reads the same backward as forward after this pre-processing.
For example, the sentence
\(A man a plan a canal Panama\)
becomes
\(amanaplanacanalpanama\)
which is a palindrome.
Your task is to read the input from standard input (stdin) and output the result to standard output (stdout) for each sentence.
inputFormat
The first line contains an integer \(n\) which represents the number of sentences. Each of the following \(n\) lines contains one sentence.
outputFormat
For each sentence, output a single line containing yes
if the sentence is a palindrome after pre-processing, otherwise output no
.
1
radar
yes
</p>