You have a list of words and a pattern, and you want to know which words in words matches the pattern. A word matches the pattern if there exists a permutation of letters p so that after replacing every letter x in the pattern with p(x), we get the d…
public class Solution { public string ConvertString(string pattern) { var dic = new Dictionary<char, int>(); ; var str = ""; ; i < pattern.Length; i++) { if (!dic.ContainsKey(pattern[i])) { dic.Add(pattern[i], code); str += code.ToStrin…