题目链接 Given an unsorted integer array, find the
first missing positive integer. For example, Given [1,2,0] return 3, and
[3,4,-1,1] return 2. Your algo...
分类:
其他好文 时间:
2014-06-29 07:44:48
阅读次数:
321
想要在电脑上正常运行jar文件,应该确认电脑已安装好jdk和jre,并配置好环境变量。
如果安装与配置都没有问题却无法运行,则有可能是注册表的问题。
解决方法:
打开注册表,注册表项的路径为:\HKEY_CLASSES_ROOT\Aplications\javaw.exe\shell\open\command
在此路径下有一默认键值, 不正常的情况下, 键值是:"C:\Program ...
分类:
其他好文 时间:
2014-06-29 07:14:24
阅读次数:
815
题目
Write a function to find the longest common prefix string amongst an array of strings.
原题链接
解题思想
给一个字符串数组,求这些字符串的最长公共前缀。
这个题应该是比较简单的,直接写代码,一次AC。解题思想是依次对数组中的字符串求最长公共前缀。
代码实现
class Sol...
分类:
其他好文 时间:
2014-06-20 12:25:09
阅读次数:
247
【题目】
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 and sum = 22,
5
/ 4 8
/ / 11 13 4
...
分类:
其他好文 时间:
2014-06-20 10:53:08
阅读次数:
181
n! means n (n
1)
...
3
2
1
For example, 10! = 10 9
...
3
2
1 = 3628800,
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
Find the sum of the digits...
分类:
其他好文 时间:
2014-06-20 09:34:10
阅读次数:
215
链接: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2113
Description
Given a number of strings, can you find how many strings that appears T times?
Input
The input conta...
分类:
编程语言 时间:
2014-06-20 09:00:14
阅读次数:
344
题目
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 and sum
= 22,
5
...
分类:
其他好文 时间:
2014-06-07 13:47:22
阅读次数:
191
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.
3
7 4
2 4 6
8 5 9 3
That is, 3 + 7 + 4 + 9 = 23.
Find th...
分类:
其他好文 时间:
2014-06-07 13:45:25
阅读次数:
189
最近项目需要用到上传下载,以前学jsp的时候直接用的是smartUpload,现在学的框架但是老师只是简单地教了框架的内容
对struts文件上传和下载没有涉及,没办法只能自己自学了!结果出现了上面的问题。
这个问题的根本原因网上都有说出来,但是没有给出的解决方案。原因是要返回的流为空,文件的路径有误导致文件的输入流为空!
所以最好在逻辑处理那块输出的你要下载文件的路径看是不是你要下载的路径...
分类:
编程语言 时间:
2014-06-07 13:15:51
阅读次数:
289
Given a binary tree, find its maximum depth.The
maximum depth is the number of nodes along the longest path from the root node
down to the farthest le...
分类:
其他好文 时间:
2014-06-05 14:10:38
阅读次数:
304