What is the degree of a tree? (As in, a tree ADT)

前端 未结 7 754
星月不相逢
星月不相逢 2021-01-02 03:27

I understand that the degree of a node is the number of children it has.

However, how do we define the degree of a tree?

7条回答
  •  星月不相逢
    2021-01-02 04:10

    Basically The degree of the tree is the total number of it's children i-e the total number nodes that originate from it.The leaf of the tree doesnot have any child so its degree is zero.

    The degree of a node is the number of partitions in the subtree which has that node as the root. Nodes with degree=0 are called leaves.

提交回复
热议问题