6

Root covers the root, what are the rest of the nodes collectively called?

skaffman
  • 398,947
  • 96
  • 818
  • 769
glenn
  • 651
  • 1
  • 6
  • 14

4 Answers4

3

I had the same problem -- I was creating a base class for all non-root nodes and was looking for a succinct name. Here's what I came up with (and I realize none of these is perfect):

  • NonRootNode -- this is a bit clumsy, but certainly descriptive
  • ChildNode -- short, but potentially misleading
  • ParentedNode -- I like this one
  • NestedNode -- might work depending on the context
Daniel Wolf
  • 12,855
  • 13
  • 54
  • 80
3

Just like in the real world: branches and leaves

They are all child nodes (of the root or some other node).

Axel Fontaine
  • 34,542
  • 16
  • 106
  • 137
2

In the middle they're called branches. On the very ends, they're leaves.

Dave
  • 3,438
  • 20
  • 13
1
        R
       / \
      B   L
     / \
    L   B
       /
      L

R is root, B are branches L are leaves

qwertymk
  • 34,200
  • 28
  • 121
  • 184