Stores the characters present in string b
HashMap < Character , Integer > Char = new HashMap < > ( ) ; for ( int i = 0 ; i < b . length ( ) ; i ++ ) { Char . put ( b . charAt ( i ) , Char . getOrDefault ( b . charAt ( i ) , 0 ) + 1 ) ; }