Reference: http://stackoverflow.com/questions/3042412/with-n-no-of-nodes-how-many-different-binary-and-binary-search-trees-possib
Recursion:
t(0) = 1
t(1) = 1
t(2) = t(0)t(1) + t(1)t(0) = 2
t(3) = t(0)t(2) + t(1)t(1) + t(2)t(0) = 5
t(4) = t(0)t(3) + t(1)t(2) + t(2)t(1) + t(3)t(0) = 14
t(5) = t(0)t(4) + t(1)t(3) + t(2)t(2) + t(3)t(1) + t(4)t(0) = 42
...
how many different bst given n nodes?
原文:http://www.cnblogs.com/miaoz/p/4501012.html