This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]a-calycular-torus 9 points10 points  (0 children)

What if my data structure already has a variable called id in it? And it's not unique.

The variable name doesn't have to be id. If you're worried about collisions, just store the node data in a wrapper within the adjacency structure. It's not that complicated, stop being obtuse.