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

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

    For a rooted tree you might define it as the degree of the root. In some scenarios saying it is the maximum degree of any node in the tree might make sense. But without context it is hard to say what the right definition is. It depends on how you want to use it and what is significant about the "degree" of a tree. If you have a concrete example in mind, or a piece of text that you find puzzling, please update the question.

提交回复
热议问题