Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

is root node an internal node

Yes! root node is an internal node.

[More explanation]
A root node is never called as a leaf node even if it is the only node present in the tree. For ex. if a tree has only one node then we say that it is a tree with only root node, we never say that the tree has a single leaf node.
Since internal node means a non-leaf node and because root node is never considered as leaf node I would say that in case of single node tree root node is an internal node.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #root #node #internal #node
ADD COMMENT
Topic
Name
1+5 =