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 identical and the nodes have the same value.思路分析:判断两个树是否相同,基本也...
分类:
其他 时间:
2015-03-19 06:23:21
收藏:
0 评论:
0 赞:
0 阅读:
269
这一篇是纯技术讨论,看过我前面文章的童鞋应该清楚,我的奔跑是靠鼠标响应的,鼠标点到哪就跑到哪,后来又有了界面,麻烦就来了,我的界面竟然能点 穿,我不希望点界面的时候还能点到界面后面的地面上,角色傻不拉几的往那跑,那肿么办呢,总不能每次点击都要判断点击的物体名称吧,那界面多了会累死的, 好在我们有标签和层这两个神器,所以我这里介绍两种方案,都能达到效果。
方案一:利用标签(Tag)...
分类:
编程语言 时间:
2015-03-19 06:22:21
收藏:
0 评论:
0 赞:
0 阅读:
517
It is kind of binary search. Since this is a sorted array, we can treat it as inorder traversal. And we can define the root node for the Tree.So find ...
分类:
其他 时间:
2015-03-19 06:19:31
收藏:
0 评论:
0 赞:
0 阅读:
284
FS Shell调用文件系统(FS)Shell命令应使用bin/hadoop fs 的形式。 所有的的FS shell命令使用URI路径作为参数。URI格式是scheme://authority/path。对 HDFS文件系统,scheme是hdfs,对本地文件系统,scheme是file。其中sc...
分类:
系统服务 时间:
2015-03-19 06:19:21
收藏:
0 评论:
0 赞:
0 阅读:
401
1. Use BFS to search the graph.2. Create a hashtable to record the one to one mapping. 1 /** 2 * Definition for undirected graph. 3 * struct Undirec.....
分类:
其他 时间:
2015-03-19 06:19:11
收藏:
0 评论:
0 赞:
0 阅读:
199
今天搞了一件很让我不爽的事情,一不小心把一个40多G的数据库日志文件删除,而且在删除之前我又搞了个日志进去,死活附加不了到服务器上去一直提示多个日志不能自动创建,白白浪费了我一个晚上的时间,后来不断的Google,终于在一个老外的博客里发现了几个语句,直接搞定,感谢他顺便记录在案。
分类:
数据库技术 时间:
2015-03-19 06:19:01
收藏:
0 评论:
0 赞:
0 阅读:
401
The minimum height controls the volumns. So let two runner at two ends start to scan the array. 1 class Solution { 2 public: 3 int maxArea(vector ...
分类:
其他 时间:
2015-03-19 06:18:51
收藏:
0 评论:
0 赞:
0 阅读:
311
For this problem just need to know the structure of two traversal.1. It is hard to find the root node in the inorder traversal but it is easy in posto...
分类:
其他 时间:
2015-03-19 06:18:41
收藏:
0 评论:
0 赞:
0 阅读:
212
The different between I and II is that:1. For II, each number only can be chosen ONCE.2. The a number, in the array, encountered more than twice will ...
分类:
其他 时间:
2015-03-19 06:18:31
收藏:
0 评论:
0 赞:
0 阅读:
241
1 SELECT TOP (5) orderid, orderdate, custid, empid2 FROM Sales.Orders3 ORDER BY orderdate DESC, orderid DESC;4 5 SELECT TOP (5) WITH TIES orderid, ord...
分类:
其他 时间:
2015-03-19 06:18:21
收藏:
0 评论:
0 赞:
0 阅读:
306
Similar to the sorted array. But we have to remember, the position of node not depends on the index. So we need do two more things:1. Ensure the point...
分类:
其他 时间:
2015-03-19 06:18:11
收藏:
0 评论:
0 赞:
0 阅读:
268
1 DECLARE @temp INT = 1;2 PRINT @temp;或者1 DECLARE @temp AS INT = 1;2 PRINT @temp;能够用同一语句声明和初始化变量是SQL Server2008的新功能。在早期版本中,应使用单独的DECLARE和SET语句。
分类:
数据库技术 时间:
2015-03-19 06:17:51
收藏:
0 评论:
0 赞:
0 阅读:
374
Same algorithm with combination. Input as the (1..n), constraint is that the length of each combine should be k. 1 class Solution { 2 public: 3 vo...
分类:
其他 时间:
2015-03-19 06:17:41
收藏:
0 评论:
0 赞:
0 阅读:
239
Very good problem to learn knapsack (complete knapsack in this case).My brutal-force solution in Python got AC too, which surprised me a bit. Here is ...
分类:
其他 时间:
2015-03-19 06:17:31
收藏:
0 评论:
0 赞:
0 阅读:
534
Two notes:1. I dont know whether C++ has a good split function for STL as the JAVA. Need to figure it out.2. At the beginning, I tried to set tmp1 = t...
分类:
其他 时间:
2015-03-19 06:17:21
收藏:
0 评论:
0 赞:
0 阅读:
222
Only different with preorder and postorder is that the root start from the beginning for preorder. 1 /** 2 * Definition for binary tree 3 * struct T.....
分类:
其他 时间:
2015-03-19 06:17:11
收藏:
0 评论:
0 赞:
0 阅读:
187
今天在配置SSM整合的过程中遇到了几个错误,折腾了好久,具体如下1、java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for在网上找了好久,最后发现是namespace没写对...
分类:
编程语言 时间:
2015-03-19 06:17:01
收藏:
0 评论:
0 赞:
0 阅读:
346
This is a classical combination question. 1 class Solution { 2 public: 3 void getComb(vector > &result, const vector &num, vector current, int sum...
分类:
其他 时间:
2015-03-19 06:16:51
收藏:
0 评论:
0 赞:
0 阅读:
244
(本例基于win7 + python3.4)import getopt, sys'''getopt 模块专门用来处理命令行参数函数getopt(args, shortopts, longopts = [])参数 args 一般是sys.argv[1:] shortopts ...
分类:
其他 时间:
2015-03-19 06:16:41
收藏:
0 评论:
0 赞:
0 阅读:
273
sudo apt-get install mysql-servermysql -u root -psudo apt-get install python-mysqldbsudo apt-get install libmysqlclient-devsudo updatedblocate mysql_c...
分类:
数据库技术 时间:
2015-03-19 06:16:31
收藏:
0 评论:
0 赞:
0 阅读:
646