摘要:
Given an in-order traversal only for a binary tree (not necessarily a BST), give a pseudo code to generate all possible binary trees for this traversal sequence.A: 数学归纳法Firstly of all, with ‘n’ number of nodes, there are (2n)!/n!*(n+1)!If like the normal definition, in-order is left child->self-& 阅读全文
posted @ 2011-12-28 10:23
百分百好牛
阅读(262)
评论(0)
推荐(0)

浙公网安备 33010602011771号