Google interview question

How to know and remove duplicate nodes from a graph?