You are viewing a single comment's thread. Return to all comments →
C++
int stringConstruction(string s) { vector<int> vec(26, 0); for (auto &&i : s) vec[i - 'a'] = 1; return accumulate(vec.begin(), vec.end(), 0); }
Seems like cookies are disabled on this browser, please enable them to open this website
String Construction
You are viewing a single comment's thread. Return to all comments →
C++