Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", which the length... ...
分类:
其他好文 时间:
2016-11-26 14:46:02
阅读次数:
160
找到提供的句子中最长的单词,并计算它的长度。 函数的返回值应该是一个数字. 这是一些对你有帮助的资源: String.split() String.length ...
分类:
其他好文 时间:
2016-11-24 18:10:53
阅读次数:
196
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3651 题意:问一个数n能拆成多少种连续的素数和。 筛出所有素数发现只有1200个,维护素数的前 ...
分类:
其他好文 时间:
2016-11-24 14:48:13
阅读次数:
236
【转载】 http://blog.csdn.net/simonchi/article/details/43231891 ERROR hdfs.BucketWriter: Hit max consecutive under-replication rotations (30) 本人在测试hdfs的si ...
分类:
Web程序 时间:
2016-11-24 14:10:03
阅读次数:
422
Bob’s Race Time Limit: 5000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Bob wants to hold a race to encourage ...
分类:
其他好文 时间:
2016-11-24 06:22:07
阅读次数:
241
Naive Solution: use DP, Time O(N^2), Space O(N) dp[i] represents the length of longest increasing subsequence till i including element i in nums array ...
分类:
其他好文 时间:
2016-11-23 08:13:25
阅读次数:
117
题目如下: Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: The di ...
分类:
其他好文 时间:
2016-11-22 23:24:39
阅读次数:
287
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: ...
分类:
编程语言 时间:
2016-11-22 22:52:05
阅读次数:
403
【题目链接】 http://www.spoj.com/problems/LCS2/ 【题目大意】 求n个串的最长公共子串 【题解】 对一个串建立后缀自动机,剩余的串在上面跑,保存匹配每个状态的最小值, 取最小值中的最大值即可。由于跑的地方只记录了匹配结尾的状态, 所以还需要更新parent树上的状态 ...
分类:
其他好文 时间:
2016-11-16 01:53:26
阅读次数:
244
原题链接: http://oj.leetcode.com/problems/longest-substring-without-repeating-characters/ 这道题用的方法是在LeetCode中很常用的方法,对于字符串的题目非常有用。 首先brute force的时间复杂度是O(n^3 ...
分类:
其他好文 时间:
2016-11-14 17:43:16
阅读次数:
141