#include <map> class Different { public: bool checkDifferent(string iniString) { // write code here map<char,int> stringnum; for(auto i:iniString){ stringnum[i] += 1; } for(auto j:stringnum){ if(j.second>1)return false; } return true; } };
#include <map> class Different { public: bool checkDifferent(string iniString) { // write code here map<char,int> stringnum; for(auto i:iniString){ stringnum[i] += 1; } for(auto j:stringnum){ if(j.second>1)return false; } return true; } };