当前位置: 动力学知识库 > 问答 > 编程问答 >

data structures - Number of binary tree with n node and n-3 height

问题描述:

How many binary trees can find that have n Node and the height of these tress are n-3?

网友答案:

The total number of Binary Tree possible with n nodes = (2nCn) / (n+1).

The minimum depth of a binary tree is ⌊log2n⌋ and the maximum depth is n-1.

So in each level level there will be [(2nCn) / (n+1)] / [(n-1) - (⌊log2n⌋)] nodes.

分享给朋友:
您可能感兴趣的文章:
随机阅读: