Traverse the second set and check if any element of it is already in hash or not .
for ( int i = 0 ; i < n2 ; i ++ ) if ( myset . find ( set2 [ i ] ) != myset . end ( ) ) return false ; return true ; }