摘要: 给定一个整数 n,求以 1 ... n 为节点组成的二叉搜索树有多少种? 示例: G(0)=G(1)=1; G(n+1)=2(2n+1)G(n)/(n+2) class Solution { public: int numTrees(int n) { long G = 1; for(int i = 阅读全文
posted @ 2019-08-30 17:59 Sherlockmmc 阅读(745) 评论(0) 推荐(0) 编辑