N个节点的二叉树形状数有随高度的N-1?节点、形状、高度、二叉树

由网友(天使吻过这片海)分享简介:如何N个节点的许多二叉树的形状有随高度的N-1?还有,你怎么会去感应打样?How many binary tree shapes of N nodes are there with height N-1?Also, how would you go about proofing by induction?高N-...

如何N个节点的许多二叉树的形状有随高度的N-1? 还有,你怎么会去感应打样?

How many binary tree shapes of N nodes are there with height N-1? Also, how would you go about proofing by induction?

高N-1与节点,二叉树n表示所有的节点都只有1名儿童,排序链状结构?因此,二叉树的数量会有所不同排列是N N数字。我在想,在正确的方向?

So binary tree of height n-1 with node n means all node will have only 1 child, sort of chain like structure? So number of binary tree will be different permutation of n numbers which is n. Am I thinking in the right direction?

推荐答案

您正在考虑在正确的方向,你已经正确改变了原来的问题很简单。然而令人奇怪的是,它是明确表示,树是二进制的时候,其实在声明中规定更严格的约束。

You are thinking in the right direction and you have correctly transformed the original problem to a simple one. However what is strange is that it is explicitly stated that the tree is "binary" when in fact the statement dictates even tighter constraint.

阅读全文

相关推荐

最新文章