DAILY LEETCODE SOLUTION || EASY C++ SOLUTION
\nTo solve this question you need to know DSU.Once you know how DSU works this question is a piece of cake.\nIf you don\'t know DSU you can think is as a black 
```\nTo solve this question you need to know DSU.Once you know how DSU works this question is a piece of cake.\nIf you don\'t know DSU you can think is as a black box which tells if the two elements are related and if related who is the ultimate parent of those two.\nfindUPar(): returns the ultimate parent of that element.\nunionBySize(): merge the both elements and updates the ultimate parent according to specified condition\nUse the DSU Template and Try solving it.\n```\n```\nclass DisjointSet {\n    vector<int>  parent, size; \npublic: \n    DisjointSet(int n) {\n        parent.resize(n+1);\n        size.resize(n+1); \n        for(int i = 0;i<=n;i++) {\n            parent[i] = i; \n            size[i] = 1; \n        }\n\t}\n    int findUPar(int node) {\n        if(node == parent[node])\n            return node; \n        return parent[node] = findUPar(parent[node]); \n    }\n\n    void unionBySize(int u, int v) {\n        int ulp_u = findUPar(u); \n        int ulp_v = findUPar(v); \n        if(ulp_u == ulp_v) return; \n        if(ulp_u < ulp_v) {\n            parent[ulp_v] = ulp_u; \n        }\n        else {\n            parent[ulp_u] = ulp_v;\n        }\n    }\n}; \nclass Solution {\npublic:\n    string smallestEquivalentString(string s1, string s2, string baseStr) {\n        DisjointSet ds(26);\n        for(int i=0;i<s1.size();i++){\n            ds.unionBySize(s1[i]-\'a\',s2[i]-\'a\');\n        }\n        string ans="";\n        for(int i=0;i<baseStr.size();i++){\n            ans+=(char)(ds.findUPar(baseStr[i]-\'a\')+\'a\');\n        }\n        return ans;\n    }\n};\n```
['Union Find', 'Graph', 'C']