摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1...n? 1 class Solution { 2 public: 3 int numTrees(int n) { 4 int 阅读全文
posted @ 2016-02-12 14:56 co0oder 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), 阅读全文
posted @ 2016-02-12 14:50 co0oder 阅读(369) 评论(0) 推荐(0) 编辑