题目:(DP)Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return al...
分类:
其他好文 时间:
2015-01-06 00:41:27
阅读次数:
147
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1.....
分类:
其他好文 时间:
2015-01-06 00:37:47
阅读次数:
204
问题描述:
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 =
"great":
great
/ ...
分类:
其他好文 时间:
2015-01-05 21:55:47
阅读次数:
192
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2015-01-05 20:13:09
阅读次数:
225
https://oj.leetcode.com/problems/binary-tree-inorder-traversal/http://blog.csdn.net/linhuanmars/article/details/20187257/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolut..
分类:
其他好文 时间:
2015-01-05 18:57:54
阅读次数:
133
https://oj.leetcode.com/problems/unique-binary-search-trees/http://blog.csdn.net/linhuanmars/article/details/24761459publicclassSolution{
publicintnumTrees(intn)
{
//See
//http://blog.csdn.net/linhuanmars/article/details/24761459
//r0=0;
//r1=1;
//r2=2;
//..
分类:
其他好文 时间:
2015-01-05 18:57:26
阅读次数:
201
https://oj.leetcode.com/problems/validate-binary-search-tree/http://blog.csdn.net/linhuanmars/article/details/23810735/**
*Definitionforbinarytree
*publicclassTreeNode{
*intval;
*TreeNodeleft;
*TreeNoderight;
*TreeNode(intx){val=x;}
*}
*/
publicclassSolutio..
分类:
其他好文 时间:
2015-01-05 18:56:26
阅读次数:
137
Author:Skate
Time:2015/01/05
MySQL schema和binary log磁盘空间趋势分析
[root@skatedb55 dist]# ./mysqlsize --help
usage: Database diskspace usage v0.1 ,(C) Copyright Skate 2014
[-h] [--load LOAD]...
分类:
数据库 时间:
2015-01-05 18:50:17
阅读次数:
237
大数据对象处理主要有CLOB(character large object) 和BLOB(binary large object) 两种类型的字段。在CLOB中可以存储大字符对象,比如长篇小说;在BLOB中可以存放二进制大数据对象,如图片、电影、音乐。1、处理CLOB数据public class J...
分类:
数据库 时间:
2015-01-05 18:18:32
阅读次数:
166
每日一练,Givenabinarytree,returnthelevelordertraversalofitsnodes‘values.(ie,fromlefttoright,levelbylevel).Forexample:Givenbinarytree{3,9,20,#,#,15,7},3
/920
/157returnitslevelordertraversalas:[
[3],
[9,20],
[15,7]
]代码如下:classSolution{
public:
in..
分类:
其他好文 时间:
2015-01-05 07:06:51
阅读次数:
165