摘要:
图解找递推公式 const int N = 20; class Solution { public: int dp[N]; int numTrees(int n) { dp[0] = 1; for (int i = 1; i <= n; i ++) for (int j = 0; j <= i - 阅读全文
摘要:
二叉搜索树 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值; 若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值; 它的左、右子树也分别为二叉搜索树 /** * Definition for a binary tree node. * struct TreeNode { * 阅读全文