标签:href problem mtr https tor solution for problems +=
class Solution {
public:
int numTrees(int n) {
vector<int> f(n + 1);
f[0] = 1;
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= i; ++j) {
f[i] += f[j - 1] * f[i - j];
}
}
return f[n];
}
};
标签:href problem mtr https tor solution for problems +=
原文地址:https://www.cnblogs.com/clown9804/p/13334636.html