Wondering is there more simple way than computing the character count of a given string as below?
String word = \"AAABBB\"; Map ch
Figured out, below is another simple way.
Map charCount = new HashMap(); for(String charr: s.split("")){ charCount.put(charr,charCount.getOrDefault(charr,0)+1); }