Should every node's value be printed out exactly once and if so, are there nodes which have two parents?
If so, I would keep the pointers in a set to mark nodes as processed but is there a more elegant solution?
If so, I would keep the pointers in a set to mark nodes as processed but is there a more elegant solution?