Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-04-22 07:04:07
阅读次数:
126
find the longest of the shortestTime Limit: 1000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2094Accepted Submi...
分类:
编程语言 时间:
2015-04-21 17:50:44
阅读次数:
177
html代码:<inputname="txtName"type="file"id="pic"onchange="loadImage(this)"/>JavaScript代码:functionloadImage(img){
varfilePath=img.value;
varfileExt=filePath.substring(filePath.lastIndexOf("."))
.toLowerCase();
if(!checkFileExt(fileExt)){
alert("您..
分类:
编程语言 时间:
2015-04-21 11:26:55
阅读次数:
297
problem:
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 leaf node.
Hide Tags
Tr...
分类:
其他好文 时间:
2015-04-21 11:20:10
阅读次数:
108
滑动窗口,但是很繁琐 public class Solution { public ArrayList findSubstring(String S, String[] L) { //http://www.cnblogs.com/springfor/p/3872516.html ...
分类:
其他好文 时间:
2015-04-21 08:20:56
阅读次数:
230
题意:输出最长递增子序列的长度思路:直接裸LIS,
#include
const int N = 1001;
int a[N], f[N], d[N]; // d[i]用于记录a[0...i]的最大长度
int bsearch(const int *f, int size, const int &a) {
int l=0, r=size-1;
while( l <= r ){...
分类:
其他好文 时间:
2015-04-20 17:03:26
阅读次数:
156
经典问题,可以把周边都做了,详见ref http://blog.csdn.net/linhuanmars/article/details/19949159public class Solution { public int lengthOfLongestSubstring(String s) ...
分类:
其他好文 时间:
2015-04-20 13:07:35
阅读次数:
115
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-04-19 15:49:13
阅读次数:
98
总结帖http://blog.csdn.net/linhuanmars/article/details/39366817code 参考帖http://www.cnblogs.com/springfor/p/3869981.htmlhttp://blog.csdn.net/linhuanmars/ar...
分类:
其他好文 时间:
2015-04-19 12:54:10
阅读次数:
120
Write a function to find the longest common prefix string amongst an array of strings.思路:这道题其实很简单。只不过一开始我就想复杂了,一看求Longest,就联想到DP。然后又联想到Set来求交并。后来,突然想到...
分类:
其他好文 时间:
2015-04-19 12:54:06
阅读次数:
121