码迷,mamicode.com
首页 >  
搜索关键字:longest substring    ( 5540个结果
LeetCode-Longest Substring Without Repeating Characters
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
hdu 1595 最短路算法dijkstra
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
JavaScript input type=file 获取文件大小及类型限制
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
leetcode || 104、Maximum Depth of Binary Tree
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
天题系列:Substring with Concatenation of All Words
滑动窗口,但是很繁琐 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
POJ 2533 Longest Ordered Subsequence (模版LIS)
题意:输出最长递增子序列的长度思路:直接裸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
Longest Substring Without Repeating Characters
经典问题,可以把周边都做了,详见ref http://blog.csdn.net/linhuanmars/article/details/19949159public class Solution { public int lengthOfLongestSubstring(String s) ...
分类:其他好文   时间:2015-04-20 13:07:35    阅读次数:115
Longest Substring Without Repeating Characters
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
Longest Consecutive Sequence
总结帖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
Longest Common Prefix
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!