Code Bug Fix: What is this subset of a n-ary tree called?

Original Source Link

Given an n-ary tree, put the root node in a list. Repeat the following procedure:

Take an arbitrary node in this list and replace it with its immediate child nodes in the tree.

At each step, the resulting list represents a subset of the three with some interesting properties:

  • No two nodes in the list are direct or indirect descendants of each other
  • Any path that I walk from the root node, I will end up at a node in this list

Is there a name for this kind of subset of an n-ary tree?

enter image description here

Tagged : / /

Leave a Reply

Your email address will not be published. Required fields are marked *