Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3 ...
分类:
其他好文 时间:
2014-10-08 11:52:35
阅读次数:
202
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
/**
* Definition for b...
分类:
其他好文 时间:
2014-10-08 10:45:45
阅读次数:
106
[leetcode]Given an array where elements are sorted in ascending order, convert it to a height balanced BST....
分类:
其他好文 时间:
2014-10-08 10:09:55
阅读次数:
164
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
/**
* http...
分类:
其他好文 时间:
2014-10-08 01:05:04
阅读次数:
253
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".详细一位一位地加即可了,考虑进位的问题。还有最后记得把生成的string反过来再返回,由于我们...
分类:
其他好文 时间:
2014-10-07 22:22:34
阅读次数:
174
安装环境:集群名pxc_lk节点1:192.168.1.20节点2:192.168.1.21节点3:192.168.1.22所有节点安装wgethttp://www.percona.com/redir/downloads/XtraBackup/LATEST/binary/redhat/6/x86_6...
分类:
数据库 时间:
2014-10-07 19:53:44
阅读次数:
366
问题: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identic...
分类:
其他好文 时间:
2014-10-07 17:55:43
阅读次数:
127
struct TreeNode{ int val; TreeNode* left; TreeNode* right; TreeNode(int val):val(val),left(NULL),right(NULL){}};Not all binary trees are bina...
分类:
其他好文 时间:
2014-10-07 15:02:23
阅读次数:
221
过去只是人生经历,并不是人生负担[问题描述]Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below bi...
分类:
其他好文 时间:
2014-10-07 13:47:03
阅读次数:
195
问题一:ubuntu eclipse c++ launch failed binary not found
解决:建完项目后 查看在项目中是不是有debug文件夹,说明没有编译,只是需要做如下操作 Project ->Build Poject 构建项目,这是应该会出现debug文件,这时你的程序就可以运行了...
分类:
系统相关 时间:
2014-10-07 10:02:53
阅读次数:
148