Given an array S of n integers, are there
elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the
array which gives the sum of ...
分类:
其他好文 时间:
2014-05-09 10:27:29
阅读次数:
449
之前在ubuntu上安装pandas,用的easy_install。这次在window上同样方法装遇到"unable
to find
vcvarsall.bat",看一些网上帖子好像说这个要装minGW解决,不喜欢装那么东西。就直接下exe装pandas,但也遇到问题,在注册表里找不到python2...
这道题是为数不多的感觉在读本科的时候见过的问题。人工构造的过程是怎样呢,后续遍历最后一个节点一定是整棵树的根节点,从中序遍历中查找到这个元素,就可以把树分为两颗子树,这个元素左侧的递归构造左子树,右侧的递归构造右子树,元素本身分配空间,作为根节点。
于set和map容器不同的是,vector容器不含find的成员函数,应该用stl的库函数,好在返回的也是迭代器,而vector的迭代器之间是可以做...
分类:
其他好文 时间:
2014-05-09 01:23:38
阅读次数:
275
Many people who transition from 35mm film to a
smaller digital camera are surprised to find that many of their digital images
are blurry. The underlyi...
分类:
其他好文 时间:
2014-05-08 23:51:44
阅读次数:
389
Given a triangle, find the minimum path sum
from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given the fol...
分类:
编程语言 时间:
2014-05-08 18:31:51
阅读次数:
399
Linux系统:Ubuntu12.04NagiosLinux客户端需要安装NRPE进行数据收集,如果在Ubuntu系统下安装过程中遇到下面的错误提示:checkingforSSLlibraries...configure:error:Cannotfindssllibraries那么可能是缺少sudoapt-getinstallopensslsudoapt-getinstalllibssl-dev如果nrpe-2.15..
分类:
移动开发 时间:
2014-05-08 17:02:07
阅读次数:
404
很简单的题目,不过还是觉得要说一下。最小深度,很快想到bfs,层序遍历嘛。本科的时候实在是没写过多少代码,一开始居然想不到怎么保存一层的信息。后来想到可以压入一个特殊的对象,每次到达这个对象就知道是一层了。我用的是空指针,觉得这个适用性还是不错的。一层的节点入队结束后,应该压入一个NULL,当一层的节点都处理完,遇到NULL的时候,要在队列尾部再入队一个NULL,这是后一层的分界线嘛。
昨天在另...
分类:
其他好文 时间:
2014-05-08 11:09:28
阅读次数:
315
Single Number
Total Accepted: 19800 Total
Submissions: 44027My Submissions
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algor...
分类:
其他好文 时间:
2014-05-08 11:01:40
阅读次数:
298
Struts2出现错误,总是提示"There is no Action mapped for
namespace / and action name"的错误。 错误代码如下: 09:36:13,515 WARN [Dispatcher] Could
not find action or result...
分类:
移动开发 时间:
2014-05-08 10:26:18
阅读次数:
525
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-08 06:33:29
阅读次数:
339