#C142. Anagram Checker
Anagram Checker
Anagram Checker
Given two strings, determine whether they are anagrams of each other. Two strings are considered anagrams if they contain the exactly same characters in any order, after ignoring all spaces, punctuation, and differences in letter case. For example, "Listen"
and "Silent"
are anagrams because when normalized (i.e., converted to lowercase and all non-alphanumeric characters removed), both become the same sorted sequence of characters.
Note: The strings can contain letters, digits, spaces, and punctuation. Your program should read from stdin
and output to stdout
.
inputFormat
The input consists of two lines. The first line contains the first string. The second line contains the second string.
outputFormat
Output a single line: True
if the two strings are anagrams, and False
otherwise.
Listen
Silent
True