Question: Write a function that checks whether two strings are isomorphic to each other or not. The strings str1 and str2 are called isomorphic if there

 Write a function that checks whether two strings are isomorphic to

Write a function that checks whether two strings are isomorphic to each other or not. The strings str1 and str2 are called isomorphic if there is a one-to-one mappina possible for every character of str1 to every character of str2 and all occurrences of every character is str1 map to the same character in str2. Example: Input: str1 is "aab" and str2 is "xxy" Output: True a' is mapped to 'x' and 'b' is mapped to 'y Example: Input: str1 is "aab" and str2 is "xyz" Output: False One correspondence of a' in str1 has 'x' in str2 and other correspondence of a' has 'y

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!