摘要:
struct TreeNode** buildTree(int start, int end, int* returnSize) { if (start > end) { (*returnSize) = 1; struct TreeNode** ret = malloc(sizeof(struct 阅读全文
摘要:
int numTrees(int n){ int hash[50]={0} ,i, j; hash[0]=1; for(i=1; i<=n; i++) for(j=1; j<=i; j++) hash[i] += hash[j-1]*hash[i-j]; return hash[n]; } 阅读全文