Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's...
分类:
其他好文 时间:
2014-06-27 18:22:07
阅读次数:
191
题目:输入一棵二叉树的根节点,求该树的深度题解分析:二叉树具有天然的递归性,首先应该想递归解法/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNod...
分类:
其他好文 时间:
2014-06-27 15:58:59
阅读次数:
206
正文:一。下载tomcat官方网站http://tomcat.apache.org在左边Download树形菜单中点击最新版本Tomcat 6.x然后在右边 找到Binary Distributions,它下边有一个,Core点击zip下载zip.解压缩之后就可以使用拉如果不想这么麻烦,好吧,下载地...
分类:
其他好文 时间:
2014-06-26 16:11:51
阅读次数:
223
题目:Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3]....
分类:
其他好文 时间:
2014-06-26 16:03:52
阅读次数:
296
题目:Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].N...
分类:
其他好文 时间:
2014-06-26 16:02:42
阅读次数:
172
题目:Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1]...
分类:
其他好文 时间:
2014-06-26 15:59:16
阅读次数:
207
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".class Solution {public: string addBinary(str...
分类:
其他好文 时间:
2014-06-26 15:52:27
阅读次数:
159
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.时间复杂度O(n^3),最大全1子矩阵,利用直方图求解,可以参考对...
分类:
其他好文 时间:
2014-06-26 15:08:46
阅读次数:
164
??
transform()的第一版本以仿函数op作用于[first,last)中的每一个元素身上,并以其结果产生出一个新序列。第二版本以仿函数binary_op作用于一双元素身上(其中一个元素来自[first1,last1),另一个元素来自“从first2开始的序列”),并以其结果产生出一个新序列。如果第二序列的元素少于第一序列,执行结果未可预期。
//版本一
template
Out...
分类:
其他好文 时间:
2014-06-26 13:39:18
阅读次数:
198
前言
前几天事情比较的多,回学校时候行李,邮寄包裹,归还图书准备毕业。之后又是入职体检,各种琐碎的小事,文章也停更了几次。今天正好有一些零碎的时间可以把之前的工作内容做一个总结整理。这篇文章就是关于EasyUI实现异步加载树的。
异步Tree
首先需明白的是这里所说的异步加载是一个宽泛的概念。以一个实际的树形菜单为例,一般情况下在数据量不大的时候,我们可以一次...
分类:
其他好文 时间:
2014-06-26 13:14:06
阅读次数:
2054