• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

Recommended Posts

ugdbrma525v5114.png

首先,读取数据(读取树)

qpe0gb5hbdf5115.png

这里,right是节点的子节点。

如果你读了,它会的

zrdnblh2dkw5116.png

遍历树,按照左右根的顺序遍历,然后别忘了更新树的深度。毕竟最后一步是求树的深度。

4jhqthalo5v5117.png

如果是叶节点,则返回时不增加深度。

ldk23si0fty5118.png

yqjpznb2yqx5119.png

Link to comment
Share on other sites