Stores the count of unique characters for each index
Dictionary < int , HashSet < char > > counts = new Dictionary < int , HashSet < char > > ( ) ; for ( int i = 0 ; i < m ; i ++ ) { counts . Add ( i , new HashSet < char > ( ) ) ; } for ( int i = 0 ; i < n ; i ++ ) {