Go, O(26n+m), 100%, use array
Code\n\nfunc smallestEquivalentString(s1 string, s2 string, baseStr string) string {\n    mapping := [26]int{}\n    for i := 0; i < 26; i++ {\n        mapping[i
# Code\n```\nfunc smallestEquivalentString(s1 string, s2 string, baseStr string) string {\n    mapping := [26]int{}\n    for i := 0; i < 26; i++ {\n        mapping[i] = i\n    }\n\n    for i := 0; i < len(s1); i++ {\n        a, b := s1[i] - \'a\', s2[i] - \'a\'\n        c, d := mapping[a], mapping[b]\n        if c > d {\n            c, d = d, c\n        }\n        // d -> c\n        for j := 0; j < 26; j++ {\n            if mapping[j] == d {\n                mapping[j] = c\n            }\n        }\n    }\n    ret := ""\n    for i := 0; i < len(baseStr); i++ {\n        t := baseStr[i] - \'a\'\n        ret += string(mapping[t] + \'a\')\n    }\n    return ret\n}\n```
['Go']