Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RootedNode ¶
RootedNode 左子右兄弟表示法结构
func (*RootedNode) Children ¶
func (r *RootedNode) Children(tree []RootedNode) []RootedNode
Children return the children of the node.
func (*RootedNode) DepthRec ¶
func (r *RootedNode) DepthRec(tree []RootedNode) int
DepthRec 返回树的深度, 递归
func (*RootedNode) Type ¶
func (r *RootedNode) Type() string
Type return the kind of node in the tree.
func (*RootedNode) Value ¶
func (r *RootedNode) Value(tree []RootedNode) int
Value return the node value in the tree.
Click to show internal directories.
Click to hide internal directories.