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

前端 未结 7 756
星月不相逢
星月不相逢 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:08

    There are 2 different definitions floating around:

    • Degree of the tree is the maximum of the degrees of the nodes of the tree. (From 'Software engineering, algorithm design and analysis', Volume 2, I. Pu, 2006)
    • Degree of tree the degree of the root. (From Wikipedia)

    So we'll have to derive the meaning from context ☠️☠️.

提交回复
热议问题