Search
⌘K
Get Premium
Leetcode 1061. Lexicographically Smallest Equivalent String
Given pairwise equivalences between characters in s1 and s2, compute character equivalence classes (e.g., with union-find) and replace each letter in baseStr with the smallest lexicographic character in its class to form the lexicographically smallest equivalent string. All strings consist of lowercase letters (lengths up to 1000).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.