add undirected graph node structure and clone graph algorithm