Stores digits present in String v [ i ] atleast once . We use a set as we only need digits which exist only once ( irrespective of reputation )
HashSet < int > digits = new HashSet < int > ( ) ; for ( int j = 0 ; j < v [ i ] . Length ; j ++ ) digits . Add ( v [ i ] [ j ] - '0' ) ;