Google Interview Question

How to know and remove duplicate nodes from a graph?