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 < Integer > digits = new HashSet < > ( ) ; for ( int j = 0 ; j < v . get ( i ) . length ( ) ; j ++ ) digits . add ( v . get ( i ) . charAt ( j ) - '0' ) ;