stringencodeDuplicate(strings){// stores the count of corresponding character (lower cased) in sunordered_map<char,int>charCount;for(charc:s)charCount[tolower(c)]++;stringans="";for(charc:s)ans+=(charCount[tolower(c)]>1)?')':'(';returnans;}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here is a C++ solution,