摘要:
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-& 阅读全文