+2 votes
in Python by

Given two strings, string1 and string2, determine if there exists a one to one character mapping between each character of string1 to string2.

1 Answer

0 votes
by

Example:

string1 = 'qwe'

string2 = 'asd'

string_map(string1, string2) == True

#q = a, w = s, and e = d

Note: This example would return False if the letters were repeated; for example, string1 = ‘donut’ and string2 =’fatty’. This is because the letter t from fatty attempts to map to two different outcomes (t = n or t = u)..

Related questions

0 votes
asked Aug 11, 2022 in GoLang by SakshiSharma
+1 vote
asked Feb 15, 2021 in Python by SakshiSharma
...