#C153. Anagram Checker
Anagram Checker
Anagram Checker
Given two strings, determine whether they are anagrams of each other after removing all non-alphabetic characters and ignoring case. Two strings S1 and S2 are considered anagrams if, after filtering, their sorted sequences of characters are identical. Mathematically, this condition can be expressed as:
\( sorted(S_1) = sorted(S_2) \)
For example, "Listen" and "Silent" are anagrams since after removing non-letter characters and converting to lowercase, both become the same sorted sequence.
inputFormat
The input is read from stdin
and consists of two lines. The first line contains the first string, and the second line contains the second string.
outputFormat
Output to stdout
either True
if the two strings are anagrams (after filtering and ignoring case), or False
if they are not.
Listen
Silent
True