Every child is replaced with a unique string.
Every parent is replaced with the replacement string used the last time it was seen as a child.
It assumes the output is depth-first dump of the tree, and that the same key doesn't occur at different levels in a node path.
In reply to Re^3: Creating tree with unique categories out of parent-child pointer list
by ikegami
in thread Creating tree with unique categories out of parent-child pointer list
by bryank
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |