C++, 100% solution easy
\nclass Solution {\npublic:\n    string smallestSubsequence(string s) {\n        vector<int> freq(26,0);\n        for(char c : s){\n            freq[c-\'a\']++;
```\nclass Solution {\npublic:\n    string smallestSubsequence(string s) {\n        vector<int> freq(26,0);\n        for(char c : s){\n            freq[c-\'a\']++;\n        }\n        vector<int> visited(26, 0);\n        \n        string ret = "";\n        \n        for(int i = 0 ; i < s.length(); i++){\n            \n            freq[s[i]-\'a\']--;\n            \n            if(visited[s[i]-\'a\']) continue;\n            \n            while(ret.length() > 0 && freq[ret.back()-\'a\'] != 0 && ret.back() > s[i]){\n                visited[ret.back()-\'a\'] = false;\n                ret.pop_back();\n            }\n            \n            ret.push_back(s[i]);\n            \n            visited[s[i]-\'a\'] = true;\n            \n        }\n        \n        return ret;\n        \n    }\n};\n```
['C', 'C++']