loading...

re: Daily Challenge #244 - Search for Letters VIEW POST

FULL DISCUSSION
 

Here is a C++ solution,

string change(string s){
    string st(26, '0');

    for(char c : s)
        if(islower(c) || isupper(c))
            st[tolower(c)-'a'] = '1';

    return st;
}
code of conduct - report abuse