Is there a term to describe all root nodes in a tree?

The root covers the root, what are the other nodes called together?

+4
source share
4 answers

Like in the real world: branches and leaves

These are all child nodes (from the root or another node).

+3
source

In the middle, they are called branches. At the very end, they are leaves.

+2
source
R / \ BL / \ LB / L 

R - root, B - branches L - leaves

0
source

I had the same problem: I was creating a base class for all nodes without root and was looking for a short name. Here is what I came up with (and I understand that none of them are perfect):

  • NonRootNode is a bit clumsy, but certainly descriptive
  • ChildNode - short but potentially misleading
  • ParentedNode - I Like This
  • NestedNode - may work depending on context
0
source

Source: https://habr.com/ru/post/1335725/


All Articles