Traverse the string , Fills the associative array count [ ] and count number of unique characters
for ( let i = 0 ; i < n ; i ++ ) { if ( count [ s [ i ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] == 0 ) { u ++ ; } count [ s [ i ] . charCodeAt ( 0 ) - ' ' . charCodeAt ( 0 ) ] ++ ; }