摘要:
http://oj.leetcode.com/problems/unique-binary-search-trees-ii/一题要求得出所有树的种类数,二题要求得出所有树。在一题的基础上修改代码,还是要提前想清楚再写。#include #include using namespace std;struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} };cl...
阅读全文