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 )
unordered_set < int > digits ; for ( int j = 0 ; j < v [ i ] . size ( ) ; j ++ ) digits . insert ( v [ i ] [ j ] - '0' ) ;