#C6889. Isomorphic Strings
Isomorphic Strings
Isomorphic Strings
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if there exists a one-to-one mapping between every character in s and every character in t. In other words, there exists a bijection f: S \to T such that for every index i, f(s[i]) = t[i].
For example, consider the strings "egg" and "add". Here, the mapping is e \to a and g \to d, so the strings are isomorphic. However, if the mapping is not consistent, the strings are not isomorphic.
Your task is to implement a solution that reads two strings from standard input and outputs True
if they are isomorphic and False
otherwise.
inputFormat
Input is read from standard input. The input consists of two lines. The first line contains the string s, and the second line contains the string t.
outputFormat
Output a single line to standard output: 'True' if the two strings are isomorphic; otherwise, 'False'.## sample
abc
abc
True