Is the root node an internal node?

后端 未结 4 1778
滥情空心
滥情空心 2021-02-20 05:57

So I\'ve looked around the web and a couple of questions here in stackoverflow here are the definition:

  • Generally, an internal node is any node that is not a leaf
4条回答
  •  终归单人心
    2021-02-20 06:38

    IMHO when you are talking about a tree with more than one node we can say the root node is an internal node. When there is only one node (the root node) the question of internal node doesn't arise. Hence we can vacuously say it is an internal node.

提交回复
热议问题