#C11306. Permutation Checker
Permutation Checker
Permutation Checker
Given two strings, determine if one string is a permutation of the other. Two strings are considered permutations if they have exactly the same characters with the same frequency, but possibly in a different order. In mathematical terms, for two strings \(s_1\) and \(s_2\), they are permutations if and only if \(|s_1| = |s_2|\) and \(sorted(s_1) = sorted(s_2)\).
Your task is to read two strings from the standard input and output True
if one string is a permutation of the other, and False
otherwise.
inputFormat
The input consists of exactly two lines. The first line contains the first string (s_1). The second line contains the second string (s_2). Note that the strings can include letters, digits, special characters, or even be empty.
outputFormat
Output a single line containing either True
or False
(without quotes). Output True
if the two strings are permutations of each other; otherwise, output False
.## sample
abc
bca
True