You are viewing a single comment's thread. Return to all comments →
My C++ Solution:
string gameOfThrones(string s) { map<char,int> mp; for(int i=0;i<s.size();i++){ mp[s[i]]++; } int count=0; for (const auto& pair : mp) { if(pair.second % 2 ==1){ count++; } if(count>=2){ return "NO"; } } return "YES"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Game of Thrones - I
You are viewing a single comment's thread. Return to all comments →
My C++ Solution: