check hash table for both . Please refer below link for help of equal ( ) https : www . geeksforgeeks . org / stdequal - in - cpp /
if ( equal ( hash_n . begin ( ) , hash_n . end ( ) , hash_curr . begin ( ) ) ) return curr ; } return -1 ; }