开发者

How to get height of binary tree and root to leaf path in C

开发者 https://www.devze.com 2023-03-25 08:42 出处:网络
I have a binary tree and I need 开发者_如何学JAVAto know the height(defined as the maximum level of the tree) and I also need to find the shortest path from the root to any leaf. How do I do that in C

I have a binary tree and I need 开发者_如何学JAVAto know the height(defined as the maximum level of the tree) and I also need to find the shortest path from the root to any leaf. How do I do that in C?


Any elementary programming course will provide an answer. See http://cslibrary.stanford.edu/110/BinaryTrees.html for example.

0

精彩评论

暂无评论...
验证码 换一张
取 消