步骤下载Tomcat,我下的是Tomcat 7.0.14(Binary Distributions tar.gz)。解压,文件夹改名为Tomcat移动该文件夹,至你习惯的目录,比如/Library执行/Library/Tomcat/bin下的startup.sh打开http://localhost:...
分类:
系统相关 时间:
2015-04-09 23:39:09
阅读次数:
181
一SQL Server(一)初步 1、SQL Server的简介 2、SQL的语言特点 (1)交互式(2)嵌入式(二)主要组件 1、服务管理器 2、企业管理器 3、建立服务器组 4、建立服务器(三)查询分析二、语言基础 (一)数据类型 1、二进制数据 binary[(n)]//固定长度 varcha...
分类:
数据库 时间:
2015-04-09 23:27:42
阅读次数:
218
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.
For example:
Given the following binary tre...
分类:
其他好文 时间:
2015-04-09 22:02:36
阅读次数:
117
Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For example:
Given the following binary tree,
1...
分类:
编程语言 时间:
2015-04-09 22:02:12
阅读次数:
145
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).
For example, this binary tree is symmetric:
1
/ \
2 2
/ \ / \
3 4 4 3...
分类:
其他好文 时间:
2015-04-09 21:57:21
阅读次数:
131
题目大意:
校门外栽满了不同高度的树,每一次询问是 如果砍掉所有高度不超过q的树,那么还有多少个连续的块。
思路分析:
记录左连续和 右连续和 用来维护区间的连续块的数量。
即
seg[num] = seg[num
如果中间部分连起来 那么减一即可。
#include
#include
#include
#include
#define maxn 50...
分类:
其他好文 时间:
2015-04-09 21:56:21
阅读次数:
160
求一棵二叉树的最低子树的高度 思路:用队列实现广度优先搜索即可,将每一层的节点放入队列,然后弹出时将下一层节点放入,遇到叶子节点时即返回当前的高度 class Solution {public: int minDepth(TreeNode *root) { if (!root) return 0; ...
分类:
其他好文 时间:
2015-04-09 21:42:15
阅读次数:
105
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:
其他好文 时间:
2015-04-09 19:18:18
阅读次数:
119
题意Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum.思路基本的深搜,注意一点就是必须是根到叶子节点求和,不可在非叶子节点处停。代码/**
* Definition for binary tree
* struct TreeNode {
*...
分类:
其他好文 时间:
2015-04-09 17:25:31
阅读次数:
147
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Hide TagsTreeDepth-first Search方法一:递归,也是dfs/** * Defi...
分类:
其他好文 时间:
2015-04-09 17:08:07
阅读次数:
105